Script/auto dependency checks #158
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a Security Assistant CLI that orchestrates BOM generation, Trivy scan, Dependency-Track upload/findings display, and Snyk (runs last).
Supports forced mode, remote DTrack servers (
--dependency-track-server), findings-only fetches (--show-dtrack-findings), duplicate BOM handling (409 treated as soft success), and optional Snyk auth skipping in forced mode. Includes README with usage/examples.Example of use:
python3 security_assistant.py -p /path/to/app/ --forced --node-version 20.19.0 --dependency-track-server http://server:8080/
Security notes
Dependency-Track token storage: API keys and other tokens are written to a local .env in plaintext. That’s convenient, but ensure the repo/root isn’t world-readable or committed.
Dependency-Track URL auto-fix: inputs are normalized and auto-switch from UI port to 8081, but there’s no strict validation/HTTPS enforcement; a maliciously crafted URL could direct uploads elsewhere. Use trusted URLs/env.
Findings output: vulnerability details are printed to stdout; be mindful when running in shared CI logs.
Default Trivy token (SECRETTOKEN123) is used if none is supplied in interactive runs in local tests; provide a real token in production.
Snyk forced mode skips auth when SNYK_TOKEN is absent; scans may fail silently if the CLI isn’t already authenticated—accepted tradeoff but worth documenting.