@clear-capabilities/agentic-security-scanner 0.148.4 → 0.148.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/4970.index.js +42 -16
- package/dist/agentic-security.mjs +1 -1
- package/dist/agentic-security.mjs.sha256 +1 -1
- package/package.json +2 -2
- package/src/engine.js +15 -1
- package/src/pipeline/assurance-mode.js +42 -16
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,32 @@
|
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
## 0.148.5 - Third premortem pass on the --assurance strict fix: clean bill of health, four polish items closed anyway
|
|
14
|
+
|
|
15
|
+
0.148.4's fix was put through a THIRD adversarial premortem pass to check whether it introduced
|
|
16
|
+
anything new. It didn't — no High-or-above defect, and one specific hypothesis (a stale
|
|
17
|
+
pre-0.148.4 cached scan producing the old, wrong message after upgrading) was investigated and
|
|
18
|
+
disproven with direct evidence: `ci` always re-scans fresh, and the affected finding types never
|
|
19
|
+
route through the disk-cached resolver path at all. Four Low-severity polish items surfaced
|
|
20
|
+
anyway and are closed here, none of them changes to already-correct behavior:
|
|
21
|
+
|
|
22
|
+
1. `cdn_no_integrity`/`dynamic_require` findings, alone with no other reason present, used to fall
|
|
23
|
+
through to a generic "share the same reason" message quoting the full raw internal string —
|
|
24
|
+
honest, but verbose, and missing the "(or drop to --assurance standard/advisory)" next step
|
|
25
|
+
every other named bucket already has. They now get their own short, specific message with that
|
|
26
|
+
same next step.
|
|
27
|
+
2. The "MULTIPLE distinct reasons" message (fired when more than one category is present at once)
|
|
28
|
+
now renders as a bulleted, newline-separated list instead of one semicolon-joined paragraph —
|
|
29
|
+
each bullet is an independently actionable problem, and the old format buried that.
|
|
30
|
+
3. `dynamic_require` and a standalone `no_lockfile` (previously only tested paired with
|
|
31
|
+
`unpinned_dep`) now each have their own direct test, closing a "shares a code path, never
|
|
32
|
+
independently verified" gap.
|
|
33
|
+
4. A new completeness guard (`scanner/test/supply-chain-provenance-completeness.test.js`) asserts
|
|
34
|
+
every supply-chain finding type `engine.js` produces is deliberately classified as either a
|
|
35
|
+
genuine absence (no origin commit exists) or a real, resolvable-in-principle source location —
|
|
36
|
+
so a future finding type added to one detection loop and forgotten in the classification can't
|
|
37
|
+
silently tell a user a permanent limitation is fixable, or vice versa.
|
|
38
|
+
|
|
13
39
|
## 0.148.4 - Adversarial premortem re-run on the 0.148.2/0.148.3 --assurance strict fix: two real defects found and fixed
|
|
14
40
|
|
|
15
41
|
0.148.2's fix for a confusing `--assurance strict` failure was itself put through an adversarial
|
package/dist/4970.index.js
CHANGED
|
@@ -109,10 +109,19 @@ function _provenanceFailureReason(badProvenance, totalFindings) {
|
|
|
109
109
|
// gap was an unfixable, by-design limitation).
|
|
110
110
|
const supplyChainReasons = ranked.filter(([r]) => r.startsWith('origin resolution does not apply to a'));
|
|
111
111
|
const supplyChainCount = supplyChainReasons.reduce((s, [, n]) => s + n, 0);
|
|
112
|
-
|
|
112
|
+
// Third known bucket (S1, adversarial premortem third pass, 2026-09-07):
|
|
113
|
+
// cdn_no_integrity/dynamic_require's "not yet wired" string (see the
|
|
114
|
+
// engine.js comment this file's `supplyChainReasons` block already
|
|
115
|
+
// references) was previously falling through to the generic `otherReasons`
|
|
116
|
+
// path below — honest, but verbose, and with no recommended next step,
|
|
117
|
+
// unlike every other named bucket here. Giving it its own bucket closes
|
|
118
|
+
// that inconsistency without touching the two already-fixed buckets.
|
|
119
|
+
const notYetWiredReasons = ranked.filter(([r]) => r.startsWith('origin resolution is not yet wired for a'));
|
|
120
|
+
const notYetWiredCount = notYetWiredReasons.reduce((s, [, n]) => s + n, 0);
|
|
121
|
+
const knownReasonSet = new Set([...gitReasons, ...supplyChainReasons, ...notYetWiredReasons].map(([r]) => r));
|
|
113
122
|
const otherReasons = ranked.filter(([r]) => !knownReasonSet.has(r));
|
|
114
|
-
const otherCount = badProvenance.length - gitCount - supplyChainCount;
|
|
115
|
-
const knownCategoryCount = (gitCount > 0 ? 1 : 0) + (supplyChainCount > 0 ? 1 : 0);
|
|
123
|
+
const otherCount = badProvenance.length - gitCount - supplyChainCount - notYetWiredCount;
|
|
124
|
+
const knownCategoryCount = (gitCount > 0 ? 1 : 0) + (supplyChainCount > 0 ? 1 : 0) + (notYetWiredCount > 0 ? 1 : 0);
|
|
116
125
|
|
|
117
126
|
// Exactly one KNOWN category, and nothing outside it — the shape every
|
|
118
127
|
// caller before this fix assumed was the only shape, and the one every
|
|
@@ -133,11 +142,17 @@ function _provenanceFailureReason(badProvenance, totalFindings) {
|
|
|
133
142
|
`(a GitHub "Download ZIP" extracts without one). Run \`git init && git add -A && git commit -m init\` in ` +
|
|
134
143
|
`the scanned directory, point the scan at a real \`git clone\`, or drop --assurance strict for standard/advisory.`;
|
|
135
144
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
145
|
+
if (supplyChainCount > 0) {
|
|
146
|
+
return `${base} — ${supplyChainCount} of them describe an ABSENT dependency declaration ` +
|
|
147
|
+
`(an unpinned version, a missing lockfile) that has no origin commit to resolve, by design. This is a ` +
|
|
148
|
+
`known, permanent limitation: strict mode cannot pass while any are present, on any real project with ` +
|
|
149
|
+
`such a dependency. Fix the underlying SCA finding(s) (pin the version / add a lockfile) if you want ` +
|
|
150
|
+
`strict to pass, or use --assurance standard/advisory for a project you don't control the dependencies of.`;
|
|
151
|
+
}
|
|
152
|
+
return `${base} — ${notYetWiredCount} of them point at a real source location (a CDN script tag, a dynamic ` +
|
|
153
|
+
`require) this engine can't yet trace back to the commit that introduced it — unlike the ABSENT-declaration ` +
|
|
154
|
+
`case above, this is an ordinary coverage gap, not a permanent limitation, but it isn't fixable from your ` +
|
|
155
|
+
`side either. Use --assurance standard/advisory if you need this scan to pass today.`;
|
|
141
156
|
}
|
|
142
157
|
|
|
143
158
|
// Two or more independently-blocking categories on the SAME scan — the
|
|
@@ -147,28 +162,39 @@ function _provenanceFailureReason(badProvenance, totalFindings) {
|
|
|
147
162
|
// rerun, and hit a second wall the first run already had full information
|
|
148
163
|
// about but never mentioned — the same "the tool knew and didn't tell me"
|
|
149
164
|
// complaint this whole function exists to fix, recurring in a milder form.
|
|
165
|
+
//
|
|
166
|
+
// Rendered as a bulleted, newline-separated list rather than one
|
|
167
|
+
// semicolon-joined paragraph (S2, adversarial premortem third pass,
|
|
168
|
+
// 2026-09-07) — each bullet is independently actionable, and a wall of
|
|
169
|
+
// clauses buried the fact that they are SEPARATE problems, each with its
|
|
170
|
+
// own fix, rather than one problem described three ways.
|
|
150
171
|
const segments = [];
|
|
151
172
|
if (gitCount > 0) {
|
|
152
173
|
const gitReasonNames = gitReasons.map(([r]) => `"${r}"`).join(' and ');
|
|
153
|
-
segments.push(`${gitCount} of them are ${gitReasonNames}
|
|
154
|
-
`run \`git init && git add -A && git commit\`, or scan a real \`git clone
|
|
174
|
+
segments.push(`${gitCount} of them are ${gitReasonNames} — strict mode requires a real git repository; ` +
|
|
175
|
+
`run \`git init && git add -A && git commit\`, or scan a real \`git clone\`.`);
|
|
155
176
|
}
|
|
156
177
|
if (supplyChainCount > 0) {
|
|
157
178
|
segments.push(`${supplyChainCount} of them describe an ABSENT dependency declaration (unpinned version / ` +
|
|
158
179
|
`missing lockfile) with no origin commit to resolve — a known, permanent limitation, not something a ` +
|
|
159
|
-
`rerun will fix
|
|
180
|
+
`rerun will fix.`);
|
|
181
|
+
}
|
|
182
|
+
if (notYetWiredCount > 0) {
|
|
183
|
+
segments.push(`${notYetWiredCount} of them point at a real source location this engine can't yet trace ` +
|
|
184
|
+
`back to a commit — an ordinary coverage gap, not a permanent limitation, but not fixable from your side.`);
|
|
160
185
|
}
|
|
161
186
|
if (otherCount > 0) {
|
|
162
187
|
if (otherReasons.length === 1) {
|
|
163
|
-
segments.push(`${otherCount} share the reason "${otherReasons[0][0]}"
|
|
188
|
+
segments.push(`${otherCount} share the reason "${otherReasons[0][0]}".`);
|
|
164
189
|
} else {
|
|
165
190
|
const breakdown = otherReasons.slice(0, 5).map(([reason, n]) => `${n}× "${reason}"`).join(', ');
|
|
166
|
-
segments.push(`${otherCount} break down as: ${breakdown}${otherReasons.length > 5 ? ', …' : ''}
|
|
191
|
+
segments.push(`${otherCount} break down as: ${breakdown}${otherReasons.length > 5 ? ', …' : ''}.`);
|
|
167
192
|
}
|
|
168
193
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
`
|
|
194
|
+
const bullets = segments.map((s) => ` - ${s}`).join('\n');
|
|
195
|
+
return `${base} — MULTIPLE distinct reasons, not just one:\n${bullets}\nEvery category above must be ` +
|
|
196
|
+
`resolved for strict to pass (or drop to --assurance standard/advisory) — fixing only one will surface the ` +
|
|
197
|
+
`next on your following run.`;
|
|
172
198
|
}
|
|
173
199
|
|
|
174
200
|
/**
|