Prerequisites
- SafeDep CLI installed (install)
- JFrog instance with Xray enabled
- JFrog Xray scoped Access Token
- Optional, for blocking malicious packages on developer machines or CIs
- JFrog Xray Malware security
policyand repositorywatchwith a block action configured
- JFrog Xray Malware security
How It Works
1
Authenticate with SafeDep
2
Start the integration daemon
--backfill with a duration: --backfill 168h covers the last 7 days.
Later runs resume from the saved cursor, so --backfill is ignored after the first run.Output
3
Verify Blocking via JFrog
Assumes a Malicious Package blocking policy and watch configured for the target repository (e.g.
npm-remote).jf npm install triggers Xray to index <Malicious Ingested Package>. Xray raises a policy violation and blocks the download.Install Output
Limitations
Malicious Packages Blocking
npm and other package managers cache packages locally on developer machines. If a developer installs a package before SafeDep flags it, the cached copy remains accessible even after the integration pushes it to Xray.
Running npm cache clean --force removes the cached copy, but it clears the entire local cache and forces a full re-download of all packages.
Configuration
CLI Flags
*Required unless the corresponding environment variable is set.
Environment Variables
For server deployments or CI pipelines, use environment variables to avoid passing secrets as CLI flags. When both are set, flags take precedence.
Example: environment variable setup
Dry run
Use--dry-run to test the feed without a JFrog connection.
A dry-run does everything a real run does, except the final step: it prints each finding instead of sending it to JFrog.
Manage the feed cursor
Therun command saves a cursor so it resumes where it stopped. The cursor is per SafeDep profile, so a change affects only the profile you select with --profile.
Move the cursor
Set the cursor to an RFC3339 timestamp. The next run processes reports updated after this time.Clear the cursor
Remove the saved cursor. The next run starts fresh from the current time, or from the--backfill window.

