@clear-capabilities/agentic-security-scanner 0.148.0 → 0.148.1
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 +67 -0
- package/dist/agentic-security.mjs +1 -1
- package/dist/agentic-security.mjs.sha256 +1 -1
- package/package.json +3 -3
- package/src/engine.js +37 -4
- package/src/posture/threat-model.js +20 -3
- package/src/sast/python-sinks.js +24 -1
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,73 @@
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
14
|
+
## 0.148.1 - Six real false-positive fixes from a customer bug report, two report-consistency fixes
|
|
15
|
+
|
|
16
|
+
A developer ran the scanner on two of their own applications and sent back a detailed,
|
|
17
|
+
reproducible bug report. All six false positives traced back to the same defect class:
|
|
18
|
+
a loosely-bounded regex matching an identifier or text substring without real syntax
|
|
19
|
+
awareness. None were caught by unit tests, because a fixture an author writes by hand is
|
|
20
|
+
shaped the way the author expects the code to look; these were found by a real user reading
|
|
21
|
+
the lines a real scan cited.
|
|
22
|
+
|
|
23
|
+
1. SQL injection fired on "Selected"/"selected". Case-insensitive `SELECT` had no word
|
|
24
|
+
boundary, so it matched the first six letters of "Selected" (an exception message) and
|
|
25
|
+
"selected" (an ordinary list variable). The rule's own name claimed "assigned to variable"
|
|
26
|
+
but never checked for an assignment; both fixed (`scanner/src/sast/python-sinks.js`).
|
|
27
|
+
|
|
28
|
+
2. A Python method literally named `fetch(self, ...)` was reported as a missing-timeout
|
|
29
|
+
HTTP-DoS finding, at its interface declaration, its implementation, and its call site, with
|
|
30
|
+
a hardcoded JavaScript remediation. The rule named JS-only APIs (fetch/axios/http.get) but
|
|
31
|
+
carried no `langScope`, so it matched the raw text "fetch(" in any language. Fixed with a
|
|
32
|
+
language scope and a declaration-vs-call exclusion (`scanner/src/engine.js`).
|
|
33
|
+
|
|
34
|
+
3. `HUGGINGFACE_TOKEN = getpass.getpass("Enter your Hugging Face token: ")` was flagged
|
|
35
|
+
Critical, Hardcoded Secret. The captured-value character class matched newlines, so once
|
|
36
|
+
the word "token" inside the human-readable PROMPT happened to be followed by `: "`, the
|
|
37
|
+
"secret" spanned past that string's own closing quote into the next function definition.
|
|
38
|
+
Excluding newlines from the class confines a match to one physical line
|
|
39
|
+
(`scanner/src/engine.js`).
|
|
40
|
+
|
|
41
|
+
4. `bundle.publisher_domain` and `bundle.published_at` were read as a message-queue producer
|
|
42
|
+
boundary. `(?:kafka|pubsub|sqs|sns)\.produce|\.publish|\.sendMessage` parses as three
|
|
43
|
+
TOP-LEVEL alternatives; only the first is scoped to a queue library, so `.publish` alone
|
|
44
|
+
matched the first 8 characters of "publisher"/"published" with no queue library and no
|
|
45
|
+
method call in sight. The identical defect existed one line above for `queue-consumer`
|
|
46
|
+
(`.subscribe`/`.receiveMessage`, e.g. an RxJS Observable) and is fixed the same way:
|
|
47
|
+
the method names moved inside the shared prefix group, and a trailing `(` is now required
|
|
48
|
+
(`scanner/src/posture/threat-model.js`).
|
|
49
|
+
|
|
50
|
+
5. `self.session = requests.Session()` was classified as an authenticated user-session asset.
|
|
51
|
+
The pattern checked only the LHS variable name, never the RHS constructor. A negative
|
|
52
|
+
lookahead now excludes `requests.Session`/`aiohttp.ClientSession`/`httpx.Client`/
|
|
53
|
+
`httpx.AsyncClient` (`scanner/src/posture/threat-model.js`).
|
|
54
|
+
|
|
55
|
+
6. `scanned.lines` was always 0 and a finding's `whyFired.scanner.rulesetVersion` was always
|
|
56
|
+
`null`, in both cases despite the top-level scan doing the right thing elsewhere. Two dead-
|
|
57
|
+
wiring bugs, not detector defects: `linesScanned` was read in `report/index.js` but never
|
|
58
|
+
assigned anywhere in the engine, and `annotateWhyFired(finalFindings, {})` was called with a
|
|
59
|
+
hardcoded empty context even though the engine already computes the real ruleset version two
|
|
60
|
+
other places in the same function (`scanner/src/engine.js`).
|
|
61
|
+
|
|
62
|
+
`scanner/src/posture/threat-model.js` had zero test coverage before this release
|
|
63
|
+
(`scanner/test/threat-model.test.js` is new). Each fix also carries a negative case proving the
|
|
64
|
+
real, intended finding is still reported — a precision fix that silences a genuine positive is
|
|
65
|
+
worse than the false positive it replaced.
|
|
66
|
+
|
|
67
|
+
Confirmed, by reading the code, NOT a bug: the duplicate `stableId` the report also flagged
|
|
68
|
+
(same id on the interface declaration and the implementation) is documented, intended
|
|
69
|
+
behavior — `stable-id.js` deliberately hashes on normalized code shape rather than file/line,
|
|
70
|
+
specifically so near-identical code keeps one id across refactors. Moot here regardless, since
|
|
71
|
+
fix 2 above means neither finding fires again.
|
|
72
|
+
|
|
73
|
+
Not fixed, flagged rather than guessed at: the report's "uncertainty inversion" observation,
|
|
74
|
+
where an unproven, low-confidence finding still produced a confident PoC, ATT&CK mapping and
|
|
75
|
+
dollar-impact narrative downstream. `mitigation-composite.js`'s `exposed-in-prod` verdict is
|
|
76
|
+
confirmed to be answering an orthogonal question by design (would a known production control
|
|
77
|
+
block this, defaulting to exposed absent one) and never reads `proof.verdict` or confidence at
|
|
78
|
+
all — so the actual gap, if real, is in a PoC or dollar-estimate consumer not gating on proof
|
|
79
|
+
state, which needs its own dedicated investigation rather than a fix rushed into this release.
|
|
80
|
+
|
|
14
81
|
## 0.148.0 - NIST SP 800-171 Rev. 3 (CUI / CMMC basis) as the 10th bundled framework
|
|
15
82
|
|
|
16
83
|
Adds NIST SP 800-171 Rev. 3 to `/compliance --report <framework>` (aliases
|