Repository navigation
feat(scan): scan jar, war and ear targets by their bundled Maven metadata - #1701
Draft
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Draft
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Jeppe Fredsgaard Blaabjerg (jfblaa) wants to merge 1 commit into
Conversation
…data `socket scan create` now accepts a .jar, .war or .ear as a target (not with --reach). A small Java 8 loader walks the archive and its nested archives with java.util.zip and reads each META-INF/maven/*/*/pom.properties with java.util.Properties; the CLI then writes `<archive>.socket.facts.json` next to the archive and uploads it with the scan. - The archive is the project; every library it ships is a direct dependency. - A nested archive is identified by the pom.properties its file name spells out (classifiers and timestamped snapshots included). - Libraries bundled inside a dependency jar are not reported until the SBOM schema can mark bundled libraries. - --exclude-paths applies; .gitignore and projectIgnorePaths do not hide an archive the user named. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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
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.
LLM Description written by Claude Code:claude-opus-5-5
Prototype:
socket scan create app.war(without--reach) now writesapp.war.socket.facts.jsonnext to the archive from the Maven metadata bundled in it, and uploads it with the scan.--reachon archives is out of scope; its design is still open.How
manifest/scripts/archive-loader) walks the archive and its nested archives withjava.util.zip, without extracting them. It reads eachMETA-INF/maven/*/*/pom.propertieswithjava.util.Propertiesand emits records. The TS side (generate-archive-facts.mts) decides what they mean and assembles the facts.pnpm run build:archive-loader, publish workflow). A published build fails closed without it.JAVA_HOMEorPATH. Without it the scan fails, as a Maven build withoutmvndoes.Identification rules
pom.propertieswhose coordinate its file name spells out: Trivy's rule, extended to classifiers, timestamped snapshots, wars and ears. Archives without a match are listed as unidentified. There is no SHA-1 or file-name lookup.pom.properties, jars in jars) are not, until the SBOM schema can mark bundled libraries (REA-890).--exclude-pathsapplies..gitignoreandprojectIgnorePathsdo not hide an archive named as a target. The archive must be inside cwd.Open questions
ROOT.war) cannot be matched to its ownpom.properties. It becomes agenericproject, and its own coordinate is reported as one of its dependencies.metadata:toolis limited to build tools, so stamping the CLI version needs a schema decision.Verification
parseSocketFactswith no validation alerts.🤖 Generated with Claude Code