Skip to content

Conversation

@idelcano
Copy link
Contributor

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.

@idelcano idelcano requested a review from cgbautista November 21, 2025 18:05
@ifoche ifoche marked this pull request as draft December 2, 2025 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants