Commit adf6ff2
committed
fix(security): scope osv-scanner to npm lockfile; jscpd --min-tokens 100
OSV-Scanner: 5th-pass run reported 0 vulnerabilities (postcss bump
worked) but exited non-zero due to transient `deps.dev` gRPC failure
during Maven transitive resolution:
Error during extraction: (extracting as transitivedependency/pomxml)
failed resolving {Maven:io.github.randomcodespace.iq:code-iq...}:
rpc error: code = Unavailable desc = service unavailable
osv-scanner v2's pomxml plugin depends on Google's deps.dev RPC service,
which is intermittently unavailable in GitHub-hosted CI. The Maven SCA
gap is filled by Trivy (filesystem scan with its own vuln DB) plus
Dependabot security updates — no advisory coverage is lost. Scope
osv-scanner to the npm lockfile, where it adds unique value beyond
Trivy's Node coverage.
jscpd: 13.29% reported with 417 clones, dominated by 7-line / ~74-token
matches on common Java imports (CodeNode/CodeEdge/NodeKind/EdgeKind +
java.nio.file scaffolding) across files that share zero refactor
surface. Default `--min-tokens 50` is too low for Java, where standard
language scaffolding and common type names produce trivial token-level
matches that aren't real code clones. Raise to 100 — corresponds
roughly to a meaningful method body. Threshold (3%), production-only
scope, and the LanguageExtractor architectural exclusion are unchanged.
engineering-standards.md §1 + §5.1 updated to document the scoping
decisions: SCA is split (osv-scanner: npm; Trivy: Maven + OS); jscpd
calibration is recorded.1 parent 061de68 commit adf6ff2
2 files changed
Lines changed: 37 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
50 | 67 | | |
51 | 68 | | |
52 | 69 | | |
| |||
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
146 | 172 | | |
147 | 173 | | |
| 174 | + | |
148 | 175 | | |
149 | 176 | | |
150 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
80 | | - | |
| 80 | + | |
| 81 | + | |
81 | 82 | | |
82 | 83 | | |
83 | 84 | | |
| |||
0 commit comments