| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…g Boot) Adds `cycode scan -t sca binary <path>` and `cycode report sbom binary <path>`. The CLI opens a Java archive locally, identifies the open-source components inside it from embedded Maven metadata (pom.properties, then optionally a Maven Central SHA-1 lookup, then MANIFEST.MF), synthesises a CycloneDX 1.4 document, and feeds it to the existing SCA scan path. The archive itself is never uploaded. What ships: - Hardened zip reader (zip-slip, symlinks, absolute paths, compression and entry-count bombs, duplicate entry names read by central-directory record). - Identification ladder with an explicit `unidentified` result; no coordinate is ever guessed from a filename or an unshaped manifest value. - Dependency graph from containment plus real edges from embedded pom.xml (parsed with a DOCTYPE/ENTITY guard, no defusedxml needed). - `--max-depth`, `--offline`, `--maven-central` (opt-in, sends the hash only), `--project-name`, `--keep-bom`, `--include-binaries`. - Coverage line and JSON fields so CI can gate on identification, not guess. - `DigestResolver` seam so the Cycode backend digest index can replace the Maven Central implementation without caller changes. No new runtime dependency. All HTTP in tests is mocked with `responses`.
| self._check_compression_ratio(entry, read_bytes) | ||
| self._budget.consume(len(chunk)) | ||
|
|
||
| sha1.update(chunk) |
There was a problem hiding this comment.
❗Cycode: SAST violation: 'Usage of weak hashing library (SHA-1)'.
Risk Score: 65 (MEDIUM)
Severity: Medium
Using a weak hashing library like SHA-1 increases the risk of data breaches. SHA-1 in particular is vulnerable to collision attacks, where two different inputs can produce the same hash value, compromising data integrity and security.
Cycode Remediation Guidelinehashlib.sha256('password').digest()hashlib.sha1('password').digest() # unsafeTell us how you wish to proceed using one of the following commands:
| Tag | Short Description |
|---|---|
| #cycode_sast_false_positive <reason> | Mark as false positive — applies to this violation only |
| #cycode_sast_ignore_here <reason> | Ignore this violation — applies to this violation only |
| #cycode_ai_remediation | Request remediation guidance using Cycode AI |
⚠️ When commenting on Github, you may need to refresh the page to see the latest updates.
Sorry, something went wrong.
There was a problem hiding this comment.
#cycode_sast_ignore_here
Intentional, non-cryptographic use. SHA-1 is the digest Maven Central and every artifact index key on, so it is the only algorithm a coordinate lookup can use; the call passes usedforsecurity=False, and SHA-256 is computed alongside and emitted in the BOM for anyone who wants a strong digest. Nothing here relies on SHA-1 for integrity or security.
Sorry, something went wrong.
There was a problem hiding this comment.
👎 This user is not permitted to perform actions.
Sorry, something went wrong.
| if not chunk: | ||
| break | ||
|
|
||
| digest.update(chunk) |
There was a problem hiding this comment.
❗Cycode: SAST violation: 'Usage of weak hashing library (SHA-1)'.
Risk Score: 65 (MEDIUM)
Severity: Medium
Using a weak hashing library like SHA-1 increases the risk of data breaches. SHA-1 in particular is vulnerable to collision attacks, where two different inputs can produce the same hash value, compromising data integrity and security.
Cycode Remediation Guidelinehashlib.sha256('password').digest()hashlib.sha1('password').digest() # unsafeTell us how you wish to proceed using one of the following commands:
| Tag | Short Description |
|---|---|
| #cycode_sast_false_positive <reason> | Mark as false positive — applies to this violation only |
| #cycode_sast_ignore_here <reason> | Ignore this violation — applies to this violation only |
| #cycode_ai_remediation | Request remediation guidance using Cycode AI |
⚠️ When commenting on Github, you may need to refresh the page to see the latest updates.
Sorry, something went wrong.
There was a problem hiding this comment.
#cycode_sast_ignore_here
Intentional, non-cryptographic use. SHA-1 is the digest Maven Central and every artifact index key on, so it is the only algorithm a coordinate lookup can use; the call passes usedforsecurity=False, and SHA-256 is computed alongside and emitted in the BOM for anyone who wants a strong digest. Nothing here relies on SHA-1 for integrity or security.
Sorry, something went wrong.
There was a problem hiding this comment.
👎 This user is not permitted to perform actions.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What
Adds binary composition analysis to the CLI: point it at a built Java artifact and get the same SCA findings a source scan gives, plus an explicit account of what could not be identified.
Supported: JAR, WAR, EAR, Spring Boot fat JAR, nested archives to --max-depth (default 3).
How it works
Product stance
Options
Security hardening in the reader
Zip-slip and absolute/drive/UNC paths, symlinks and non-regular entries, per-entry and total size limits, compression-ratio and entry-count bombs, truncated central directories, and duplicate entry names (Python's ZipFile.open(name) returns the last duplicate; every entry is read from its own ZipInfo so a vulnerable jar cannot hide behind a patched one with the same name). Embedded pom.xml is refused if it carries a DOCTYPE or ENTITY declaration, which closes entity expansion without adding defusedxml. Console output from entry names is stripped of rich markup, control characters and unbounded length.
Verification
Not in this PR
Note on the ticket prefix
Branch and title use the product ticket PM-4777. If a CM- ticket should own this, the title and branch are a rename away.
🤖 Generated with Claude Code
https://claude.ai/code/session_01CmShLt7zGmitrn35FBPMw9