-
-
Notifications
You must be signed in to change notification settings - Fork 210
allowlist+trace for commands and http #1992
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CDXGEN_ALLOWED_HOSTS=localhost,*.maven.org FETCH_LICENSE=true CDXGEN_TRACE_ID=foo node ~/work/cyclonedx/cdxgen/bin/cdxgen.js -t java --json-pretty -o bom.json $(pwd) (base)
{"traceId":"foo","timestamp":"2025-06-26T21:38:41.960Z","type":"spawn","command":"mvn","args":["dependency:tree","-N","-DoutputFile=/var/folders/sj/g0xj1gyn05qcvc6r3j3syg6h0000gn/T/cdxmvn-nW2AV7/mvn-parent-tree.txt"],"cwd":"/Users/prabhu/sandbox/java-sec-code"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:43.260Z","type":"spawn","command":"mvn","args":["dependency:tree","-DoutputFile=/var/folders/sj/g0xj1gyn05qcvc6r3j3syg6h0000gn/T/cdxmvn-nW2AV7/mvn-tree.txt"],"cwd":"/Users/prabhu/sandbox/java-sec-code"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:44.682Z","type":"http","protocol":"https:","host":"repo1.maven.org","pathname":"/maven2/org/springframework/boot/spring-boot-starter-web/1.5.1.RELEASE/spring-boot-starter-web-1.5.1.RELEASE.pom"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:44.911Z","type":"http","protocol":"https:","host":"repo1.maven.org","pathname":"/maven2/org/springframework/boot/spring-boot-starters/1.5.1.RELEASE/spring-boot-starters-1.5.1.RELEASE.pom"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:44.961Z","type":"http","protocol":"https:","host":"repo1.maven.org","pathname":"/maven2/org/springframework/boot/spring-boot-starter-web/1.5.1.RELEASE/spring-boot-starter-web-1.5.1.RELEASE.pom"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:44.962Z","type":"http","protocol":"https:","host":"repo1.maven.org","pathname":"/maven2/org/springframework/boot/spring-boot-starter/1.5.1.RELEASE/spring-boot-starter-1.5.1.RELEASE.pom"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:45.007Z","type":"http","protocol":"https:","host":"repo1.maven.org","pathname":"/maven2/org/springframework/boot/spring-boot-starters/1.5.1.RELEASE/spring-boot-starters-1.5.1.RELEASE.pom"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:45.008Z","type":"http","protocol":"https:","host":"repo1.maven.org","pathname":"/maven2/org/springframework/boot/spring-boot-starter/1.5.1.RELEASE/spring-boot-starter-1.5.1.RELEASE.pom"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:45.009Z","type":"http","protocol":"https:","host":"repo1.maven.org","pathname":"/maven2/org/springframework/boot/spring-boot/1.5.1.RELEASE/spring-boot-1.5.1.RELEASE.pom"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:45.062Z","type":"http","protocol":"https:","host":"repo1.maven.org","pathname":"/maven2/org/springframework/boot/spring-boot-parent/1.5.1.RELEASE/spring-boot-parent-1.5.1.RELEASE.pom"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:45.126Z","type":"http","protocol":"https:","host":"repo1.maven.org","pathname":"/maven2/org/springframework/boot/spring-boot/1.5.1.RELEASE/spring-boot-1.5.1.RELEASE.pom"} |
CDXGEN_ALLOWED_HOSTS=localhost FETCH_LICENSE=true CDXGEN_TRACE_ID=foo node ~/work/cyclonedx/cdxgen/bin/cdxgen.js -t java --json-pretty -o bom.json $(pwd) (base)
{"traceId":"foo","timestamp":"2025-06-26T21:38:16.329Z","type":"spawn","command":"mvn","args":["dependency:tree","-N","-DoutputFile=/var/folders/sj/g0xj1gyn05qcvc6r3j3syg6h0000gn/T/cdxmvn-6UtQQ1/mvn-parent-tree.txt"],"cwd":"/Users/prabhu/sandbox/java-sec-code"}
{"traceId":"foo","timestamp":"2025-06-26T21:38:17.672Z","type":"spawn","command":"mvn","args":["dependency:tree","-DoutputFile=/var/folders/sj/g0xj1gyn05qcvc6r3j3syg6h0000gn/T/cdxmvn-6UtQQ1/mvn-tree.txt"],"cwd":"/Users/prabhu/sandbox/java-sec-code"}
Access to the remote host 'repo1.maven.org' is not permitted. |
This was
linked to
issues
Jun 27, 2025
bc0a860
to
8944a70
Compare
|
001443b
to
6e5a7ac
Compare
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
6e5a7ac
to
651403c
Compare
Will merge this so that we can continue testing against master and with the container images. |
malice00
pushed a commit
that referenced
this pull request
Jul 1, 2025
* Allowlists for commands and remote hosts Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com> * Fix grammar Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com> * Display allowlist suggestion Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com> * CRLF and gitconfig injection mitigation Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com> * Fixes #1953 and #1962 Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com> * Recreate lock file Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com> * Only allow https protocol in secure mode Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com> --------- Signed-off-by: Prabhu Subramanian <prabhu@appthreat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #1909
Fixes #1964
Added a couple of environment variables (!), CDXGEN_ALLOWED_HOSTS and CDXGEN_ALLOWED_COMMANDS to accept comma-separated allowed values. Another environment variable
CDXGEN_TRACE_MODE
can be used to simply trace the commands executed and remote hosts accessed (especially with FETCH_LICENSE).