@clear-capabilities/agentic-security-scanner 0.78.0 → 0.80.0
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/bin/.agentic-security/findings.json +16 -16
- package/bin/.agentic-security/last-scan.json +16 -16
- package/bin/.agentic-security/last-scan.json.sig +1 -1
- package/bin/.agentic-security/scan-history.json +51 -0
- package/bin/.agentic-security/streak.json +5 -5
- package/bin/agentic-security.js +22 -7
- package/dist/178.index.js +1 -1
- package/dist/333.index.js +283 -0
- package/dist/384.index.js +1 -1
- package/dist/476.index.js +5 -5
- package/dist/637.index.js +1 -1
- package/dist/700.index.js +138 -0
- package/dist/718.index.js +53 -0
- package/dist/838.index.js +1 -1
- package/dist/985.index.js +95 -1
- package/dist/agentic-security.mjs +83 -83
- package/dist/agentic-security.mjs.sha256 +1 -1
- package/package.json +6 -4
- package/src/.agentic-security/findings.json +29799 -7803
- package/src/.agentic-security/last-scan.json +29799 -7803
- package/src/.agentic-security/last-scan.json.sig +1 -1
- package/src/.agentic-security/scan-history.json +5119 -2611
- package/src/.agentic-security/streak.json +6 -6
- package/src/dataflow/.agentic-security/findings.json +2879 -308
- package/src/dataflow/.agentic-security/last-scan.json +2879 -308
- package/src/dataflow/.agentic-security/last-scan.json.sig +1 -1
- package/src/dataflow/.agentic-security/scan-history.json +68 -520
- package/src/dataflow/.agentic-security/streak.json +6 -7
- package/src/dataflow/cross-service-taint.js +201 -0
- package/src/dataflow/engine.js +52 -8
- package/src/dataflow/formal-verify.js +204 -0
- package/src/dataflow/ifds-precise.js +222 -0
- package/src/dataflow/k2-summary-cache.js +153 -0
- package/src/dataflow/lib-taint-summaries.js +198 -0
- package/src/dataflow/privacy-taint.js +205 -0
- package/src/dataflow/smt-feasibility.js +189 -0
- package/src/engine.js +890 -132
- package/src/integrations/index.js +2 -1
- package/src/ir/.agentic-security/findings.json +240 -6
- package/src/ir/.agentic-security/last-scan.json +240 -6
- package/src/ir/.agentic-security/last-scan.json.sig +1 -1
- package/src/ir/.agentic-security/scan-history.json +16 -594
- package/src/ir/.agentic-security/streak.json +8 -9
- package/src/ir/callgraph.js +27 -7
- package/src/ir/cpp-preprocessor.js +142 -0
- package/src/ir/csharp-ir.js +604 -0
- package/src/ir/universal-ir.js +403 -0
- package/src/llm-validator/index.js +7 -5
- package/src/mcp/.agentic-security/findings.json +8632 -0
- package/src/mcp/.agentic-security/last-scan.json +8632 -0
- package/src/mcp/.agentic-security/last-scan.json.sig +1 -0
- package/src/mcp/.agentic-security/scan-history.json +143 -0
- package/src/mcp/.agentic-security/streak.json +20 -0
- package/src/mcp/audit.js +5 -0
- package/src/mcp/tools.js +90 -1
- package/src/posture/.agentic-security/findings.json +16809 -4367
- package/src/posture/.agentic-security/last-scan.json +16809 -4367
- package/src/posture/.agentic-security/last-scan.json.sig +1 -1
- package/src/posture/.agentic-security/scan-history.json +6689 -177
- package/src/posture/.agentic-security/streak.json +8 -7
- package/src/posture/api-contract.js +193 -0
- package/src/posture/attack-taxonomy.js +227 -0
- package/src/posture/calibration-drift.js +2 -1
- package/src/posture/calibration.js +3 -2
- package/src/posture/compliance-policy.js +218 -0
- package/src/posture/composite-risk.js +122 -0
- package/src/posture/csharp-analysis.js +330 -0
- package/src/posture/exploit-bundle.js +210 -0
- package/src/posture/federated-learning.js +172 -0
- package/src/posture/fix-history.js +8 -2
- package/src/posture/license-attributions.js +94 -0
- package/src/posture/license-graph.js +238 -0
- package/src/posture/pqc-migration-plan.js +158 -0
- package/src/posture/profile.js +4 -5
- package/src/posture/reachability-filter.js +33 -2
- package/src/posture/realtime-cve-monitor.js +214 -0
- package/src/posture/rule-overrides.js +2 -3
- package/src/posture/rule-pack-signing.js +2 -3
- package/src/posture/rule-synthesis.js +5 -6
- package/src/posture/runtime-correlation.js +174 -0
- package/src/posture/sbom-diff.js +171 -0
- package/src/posture/sca-policy.js +235 -0
- package/src/posture/sca-upgrade.js +259 -0
- package/src/posture/security-trend.js +4 -7
- package/src/posture/state-dir.js +124 -0
- package/src/posture/streak.js +3 -0
- package/src/posture/suppressions.js +5 -8
- package/src/posture/threat-model-auto.js +268 -0
- package/src/posture/triage-learning.js +170 -0
- package/src/posture/triage.js +29 -6
- package/src/posture/validator-metrics.js +3 -6
- package/src/sast/.agentic-security/findings.json +996 -32
- package/src/sast/.agentic-security/last-scan.json +996 -32
- package/src/sast/.agentic-security/last-scan.json.sig +1 -1
- package/src/sast/.agentic-security/scan-history.json +565 -32
- package/src/sast/.agentic-security/streak.json +10 -8
- package/src/sast/_secret-entropy.js +145 -0
- package/src/sast/cloud-iam.js +312 -0
- package/src/sast/cpp.js +138 -4
- package/src/sast/crypto-protocol.js +388 -0
- package/src/sast/csharp-tokenizer.js +392 -0
- package/src/sast/csharp.js +924 -138
- package/src/sast/dapp-frontend.js +200 -0
- package/src/sast/db-taint.js +24 -0
- package/src/sast/k8s-admission.js +271 -0
- package/src/sast/llm-app.js +272 -0
- package/src/sast/ml-supply-chain.js +259 -0
- package/src/sast/mobile.js +224 -0
- package/src/sast/post-quantum-crypto.js +348 -0
- package/src/sast/rust.js +26 -0
- package/src/sast/web3-advanced.js +375 -0
- package/src/sca/.agentic-security/findings.json +6044 -171
- package/src/sca/.agentic-security/last-scan.json +6044 -171
- package/src/sca/.agentic-security/last-scan.json.sig +1 -1
- package/src/sca/.agentic-security/scan-history.json +83 -6
- package/src/sca/.agentic-security/streak.json +9 -9
- package/src/sca/CLAUDE.md +161 -0
- package/src/sca/binary-metadata.js +146 -0
- package/src/sca/py-package-functions.js +118 -0
- package/src/sca/sigstore-verify.js +215 -0
- package/src/sca/vendor-detect.js +53 -0
- package/src/report/.agentic-security/findings.json +0 -80
- package/src/report/.agentic-security/last-scan.json +0 -80
- package/src/report/.agentic-security/last-scan.json.sig +0 -1
- package/src/report/.agentic-security/scan-history.json +0 -35
- package/src/report/.agentic-security/streak.json +0 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"scanId": "
|
|
3
|
-
"startedAt": "2026-05-
|
|
4
|
-
"durationMs":
|
|
2
|
+
"scanId": "bb8f9491-46eb-4ec6-a21b-df7b0a436001",
|
|
3
|
+
"startedAt": "2026-05-28T14:16:52.841Z",
|
|
4
|
+
"durationMs": 320,
|
|
5
5
|
"scanned": {
|
|
6
6
|
"files": 7,
|
|
7
7
|
"lines": 0
|
|
@@ -759,7 +759,7 @@
|
|
|
759
759
|
"attackPlaybook": null
|
|
760
760
|
},
|
|
761
761
|
{
|
|
762
|
-
"id": "toctou-fs:agentic-security.js:
|
|
762
|
+
"id": "toctou-fs:agentic-security.js:367",
|
|
763
763
|
"kind": "sast",
|
|
764
764
|
"severity": "medium",
|
|
765
765
|
"vuln": "TOCTOU: file existence/permission check before open",
|
|
@@ -767,7 +767,7 @@
|
|
|
767
767
|
"owaspLlm": null,
|
|
768
768
|
"stride": "Tampering",
|
|
769
769
|
"file": "agentic-security.js",
|
|
770
|
-
"line":
|
|
770
|
+
"line": 367,
|
|
771
771
|
"snippet": "if (args.flags['since-baseline'] && fs.existsSync(baselinePath)) {",
|
|
772
772
|
"fix": null,
|
|
773
773
|
"reachable": false,
|
|
@@ -848,7 +848,7 @@
|
|
|
848
848
|
"dominantDriver": "legal counsel",
|
|
849
849
|
"comparable": "Generic finding — likely cost driven by user count + jurisdiction stack",
|
|
850
850
|
"confidence": "low",
|
|
851
|
-
"narrative": "TOCTOU: file existence/permission check before open on `agentic-security.js:
|
|
851
|
+
"narrative": "TOCTOU: file existence/permission check before open on `agentic-security.js:367` could expose configuration / internal data. Context: general SaaS / no specific regulatory exposure. Estimated cost: best $23k · likely $136k · worst $775k. Dominant driver: legal counsel. Comparable: Generic finding — likely cost driven by user count + jurisdiction stack."
|
|
852
852
|
},
|
|
853
853
|
"stableId": "ba3080b44d262d10",
|
|
854
854
|
"confidenceTier": "medium",
|
|
@@ -981,7 +981,7 @@
|
|
|
981
981
|
"attackPlaybook": null
|
|
982
982
|
},
|
|
983
983
|
{
|
|
984
|
-
"id": "toctou-fs:agentic-security.js:
|
|
984
|
+
"id": "toctou-fs:agentic-security.js:1151",
|
|
985
985
|
"kind": "sast",
|
|
986
986
|
"severity": "medium",
|
|
987
987
|
"vuln": "TOCTOU: file existence/permission check before open",
|
|
@@ -989,7 +989,7 @@
|
|
|
989
989
|
"owaspLlm": null,
|
|
990
990
|
"stride": "Tampering",
|
|
991
991
|
"file": "agentic-security.js",
|
|
992
|
-
"line":
|
|
992
|
+
"line": 1151,
|
|
993
993
|
"snippet": "const st = fs.statSync(abs);",
|
|
994
994
|
"fix": null,
|
|
995
995
|
"reachable": false,
|
|
@@ -1070,7 +1070,7 @@
|
|
|
1070
1070
|
"dominantDriver": "legal counsel",
|
|
1071
1071
|
"comparable": "Generic finding — likely cost driven by user count + jurisdiction stack",
|
|
1072
1072
|
"confidence": "low",
|
|
1073
|
-
"narrative": "TOCTOU: file existence/permission check before open on `agentic-security.js:
|
|
1073
|
+
"narrative": "TOCTOU: file existence/permission check before open on `agentic-security.js:1151` could expose configuration / internal data. Context: general SaaS / no specific regulatory exposure. Estimated cost: best $23k · likely $136k · worst $775k. Dominant driver: legal counsel. Comparable: Generic finding — likely cost driven by user count + jurisdiction stack."
|
|
1074
1074
|
},
|
|
1075
1075
|
"stableId": "17f63a600e3a68b4",
|
|
1076
1076
|
"confidenceTier": "medium",
|
|
@@ -1701,14 +1701,14 @@
|
|
|
1701
1701
|
"family": null
|
|
1702
1702
|
},
|
|
1703
1703
|
{
|
|
1704
|
-
"id": "logic:agentic-security.js:
|
|
1704
|
+
"id": "logic:agentic-security.js:367:TOCTOU:_existsSync_followed_by_file_op",
|
|
1705
1705
|
"kind": "logic",
|
|
1706
1706
|
"severity": "medium",
|
|
1707
1707
|
"vuln": "TOCTOU: existsSync followed by file op",
|
|
1708
1708
|
"cwe": "CWE-367",
|
|
1709
1709
|
"stride": "Tampering",
|
|
1710
1710
|
"file": "agentic-security.js",
|
|
1711
|
-
"line":
|
|
1711
|
+
"line": 367,
|
|
1712
1712
|
"snippet": "if (args.flags['since-baseline'] && fs.existsSync(baselinePath)) {",
|
|
1713
1713
|
"fix": {
|
|
1714
1714
|
"description": "Replace the check-then-act sequence with a single atomic operation (e.g., `fs.open` with appropriate flags). Between `existsSync` and the file op the file can be replaced by a symlink or removed.",
|
|
@@ -1778,7 +1778,7 @@
|
|
|
1778
1778
|
"dominantDriver": "legal counsel",
|
|
1779
1779
|
"comparable": "Generic finding — likely cost driven by user count + jurisdiction stack",
|
|
1780
1780
|
"confidence": "low",
|
|
1781
|
-
"narrative": "TOCTOU: existsSync followed by file op on `agentic-security.js:
|
|
1781
|
+
"narrative": "TOCTOU: existsSync followed by file op on `agentic-security.js:367` could expose configuration / internal data. Context: general SaaS / no specific regulatory exposure. Estimated cost: best $23k · likely $136k · worst $775k. Dominant driver: legal counsel. Comparable: Generic finding — likely cost driven by user count + jurisdiction stack."
|
|
1782
1782
|
},
|
|
1783
1783
|
"parser": "LOGIC",
|
|
1784
1784
|
"family": null
|
|
@@ -1787,7 +1787,7 @@
|
|
|
1787
1787
|
"bundles": [],
|
|
1788
1788
|
"routes": [],
|
|
1789
1789
|
"components": [],
|
|
1790
|
-
"suppressedCount":
|
|
1790
|
+
"suppressedCount": 42,
|
|
1791
1791
|
"blastRadiusSignals": {
|
|
1792
1792
|
"industry": "generic",
|
|
1793
1793
|
"industryConfidence": "low",
|
|
@@ -1805,7 +1805,7 @@
|
|
|
1805
1805
|
"_v3": {
|
|
1806
1806
|
"counterfactual": {
|
|
1807
1807
|
"spofControls": [],
|
|
1808
|
-
"controlsDetected":
|
|
1808
|
+
"controlsDetected": 119
|
|
1809
1809
|
},
|
|
1810
1810
|
"threatModel": {
|
|
1811
1811
|
"summary": {
|
|
@@ -1854,13 +1854,13 @@
|
|
|
1854
1854
|
{
|
|
1855
1855
|
"vuln": "TOCTOU: file existence/permission check before open",
|
|
1856
1856
|
"file": "agentic-security.js",
|
|
1857
|
-
"line":
|
|
1857
|
+
"line": 367,
|
|
1858
1858
|
"severity": "medium"
|
|
1859
1859
|
},
|
|
1860
1860
|
{
|
|
1861
1861
|
"vuln": "TOCTOU: file existence/permission check before open",
|
|
1862
1862
|
"file": "agentic-security.js",
|
|
1863
|
-
"line":
|
|
1863
|
+
"line": 1151,
|
|
1864
1864
|
"severity": "medium"
|
|
1865
1865
|
}
|
|
1866
1866
|
],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"scanId": "
|
|
3
|
-
"startedAt": "2026-05-
|
|
4
|
-
"durationMs":
|
|
2
|
+
"scanId": "bb8f9491-46eb-4ec6-a21b-df7b0a436001",
|
|
3
|
+
"startedAt": "2026-05-28T14:16:52.841Z",
|
|
4
|
+
"durationMs": 320,
|
|
5
5
|
"scanned": {
|
|
6
6
|
"files": 7,
|
|
7
7
|
"lines": 0
|
|
@@ -759,7 +759,7 @@
|
|
|
759
759
|
"attackPlaybook": null
|
|
760
760
|
},
|
|
761
761
|
{
|
|
762
|
-
"id": "toctou-fs:agentic-security.js:
|
|
762
|
+
"id": "toctou-fs:agentic-security.js:367",
|
|
763
763
|
"kind": "sast",
|
|
764
764
|
"severity": "medium",
|
|
765
765
|
"vuln": "TOCTOU: file existence/permission check before open",
|
|
@@ -767,7 +767,7 @@
|
|
|
767
767
|
"owaspLlm": null,
|
|
768
768
|
"stride": "Tampering",
|
|
769
769
|
"file": "agentic-security.js",
|
|
770
|
-
"line":
|
|
770
|
+
"line": 367,
|
|
771
771
|
"snippet": "if (args.flags['since-baseline'] && fs.existsSync(baselinePath)) {",
|
|
772
772
|
"fix": null,
|
|
773
773
|
"reachable": false,
|
|
@@ -848,7 +848,7 @@
|
|
|
848
848
|
"dominantDriver": "legal counsel",
|
|
849
849
|
"comparable": "Generic finding — likely cost driven by user count + jurisdiction stack",
|
|
850
850
|
"confidence": "low",
|
|
851
|
-
"narrative": "TOCTOU: file existence/permission check before open on `agentic-security.js:
|
|
851
|
+
"narrative": "TOCTOU: file existence/permission check before open on `agentic-security.js:367` could expose configuration / internal data. Context: general SaaS / no specific regulatory exposure. Estimated cost: best $23k · likely $136k · worst $775k. Dominant driver: legal counsel. Comparable: Generic finding — likely cost driven by user count + jurisdiction stack."
|
|
852
852
|
},
|
|
853
853
|
"stableId": "ba3080b44d262d10",
|
|
854
854
|
"confidenceTier": "medium",
|
|
@@ -981,7 +981,7 @@
|
|
|
981
981
|
"attackPlaybook": null
|
|
982
982
|
},
|
|
983
983
|
{
|
|
984
|
-
"id": "toctou-fs:agentic-security.js:
|
|
984
|
+
"id": "toctou-fs:agentic-security.js:1151",
|
|
985
985
|
"kind": "sast",
|
|
986
986
|
"severity": "medium",
|
|
987
987
|
"vuln": "TOCTOU: file existence/permission check before open",
|
|
@@ -989,7 +989,7 @@
|
|
|
989
989
|
"owaspLlm": null,
|
|
990
990
|
"stride": "Tampering",
|
|
991
991
|
"file": "agentic-security.js",
|
|
992
|
-
"line":
|
|
992
|
+
"line": 1151,
|
|
993
993
|
"snippet": "const st = fs.statSync(abs);",
|
|
994
994
|
"fix": null,
|
|
995
995
|
"reachable": false,
|
|
@@ -1070,7 +1070,7 @@
|
|
|
1070
1070
|
"dominantDriver": "legal counsel",
|
|
1071
1071
|
"comparable": "Generic finding — likely cost driven by user count + jurisdiction stack",
|
|
1072
1072
|
"confidence": "low",
|
|
1073
|
-
"narrative": "TOCTOU: file existence/permission check before open on `agentic-security.js:
|
|
1073
|
+
"narrative": "TOCTOU: file existence/permission check before open on `agentic-security.js:1151` could expose configuration / internal data. Context: general SaaS / no specific regulatory exposure. Estimated cost: best $23k · likely $136k · worst $775k. Dominant driver: legal counsel. Comparable: Generic finding — likely cost driven by user count + jurisdiction stack."
|
|
1074
1074
|
},
|
|
1075
1075
|
"stableId": "17f63a600e3a68b4",
|
|
1076
1076
|
"confidenceTier": "medium",
|
|
@@ -1701,14 +1701,14 @@
|
|
|
1701
1701
|
"family": null
|
|
1702
1702
|
},
|
|
1703
1703
|
{
|
|
1704
|
-
"id": "logic:agentic-security.js:
|
|
1704
|
+
"id": "logic:agentic-security.js:367:TOCTOU:_existsSync_followed_by_file_op",
|
|
1705
1705
|
"kind": "logic",
|
|
1706
1706
|
"severity": "medium",
|
|
1707
1707
|
"vuln": "TOCTOU: existsSync followed by file op",
|
|
1708
1708
|
"cwe": "CWE-367",
|
|
1709
1709
|
"stride": "Tampering",
|
|
1710
1710
|
"file": "agentic-security.js",
|
|
1711
|
-
"line":
|
|
1711
|
+
"line": 367,
|
|
1712
1712
|
"snippet": "if (args.flags['since-baseline'] && fs.existsSync(baselinePath)) {",
|
|
1713
1713
|
"fix": {
|
|
1714
1714
|
"description": "Replace the check-then-act sequence with a single atomic operation (e.g., `fs.open` with appropriate flags). Between `existsSync` and the file op the file can be replaced by a symlink or removed.",
|
|
@@ -1778,7 +1778,7 @@
|
|
|
1778
1778
|
"dominantDriver": "legal counsel",
|
|
1779
1779
|
"comparable": "Generic finding — likely cost driven by user count + jurisdiction stack",
|
|
1780
1780
|
"confidence": "low",
|
|
1781
|
-
"narrative": "TOCTOU: existsSync followed by file op on `agentic-security.js:
|
|
1781
|
+
"narrative": "TOCTOU: existsSync followed by file op on `agentic-security.js:367` could expose configuration / internal data. Context: general SaaS / no specific regulatory exposure. Estimated cost: best $23k · likely $136k · worst $775k. Dominant driver: legal counsel. Comparable: Generic finding — likely cost driven by user count + jurisdiction stack."
|
|
1782
1782
|
},
|
|
1783
1783
|
"parser": "LOGIC",
|
|
1784
1784
|
"family": null
|
|
@@ -1787,7 +1787,7 @@
|
|
|
1787
1787
|
"bundles": [],
|
|
1788
1788
|
"routes": [],
|
|
1789
1789
|
"components": [],
|
|
1790
|
-
"suppressedCount":
|
|
1790
|
+
"suppressedCount": 42,
|
|
1791
1791
|
"blastRadiusSignals": {
|
|
1792
1792
|
"industry": "generic",
|
|
1793
1793
|
"industryConfidence": "low",
|
|
@@ -1805,7 +1805,7 @@
|
|
|
1805
1805
|
"_v3": {
|
|
1806
1806
|
"counterfactual": {
|
|
1807
1807
|
"spofControls": [],
|
|
1808
|
-
"controlsDetected":
|
|
1808
|
+
"controlsDetected": 119
|
|
1809
1809
|
},
|
|
1810
1810
|
"threatModel": {
|
|
1811
1811
|
"summary": {
|
|
@@ -1854,13 +1854,13 @@
|
|
|
1854
1854
|
{
|
|
1855
1855
|
"vuln": "TOCTOU: file existence/permission check before open",
|
|
1856
1856
|
"file": "agentic-security.js",
|
|
1857
|
-
"line":
|
|
1857
|
+
"line": 367,
|
|
1858
1858
|
"severity": "medium"
|
|
1859
1859
|
},
|
|
1860
1860
|
{
|
|
1861
1861
|
"vuln": "TOCTOU: file existence/permission check before open",
|
|
1862
1862
|
"file": "agentic-security.js",
|
|
1863
|
-
"line":
|
|
1863
|
+
"line": 1151,
|
|
1864
1864
|
"severity": "medium"
|
|
1865
1865
|
}
|
|
1866
1866
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
5bb921912d508574fede241a7e16cd7ac261f415b200e9eff04093fa70426dd1
|
|
@@ -111,5 +111,56 @@
|
|
|
111
111
|
"toctou-fs:agentic-security.js:1136",
|
|
112
112
|
"toctou-fs:agentic-security.js:362"
|
|
113
113
|
]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"timestamp": "2026-05-28T14:13:54.951Z",
|
|
117
|
+
"label": "scan",
|
|
118
|
+
"total": 5,
|
|
119
|
+
"critical": 0,
|
|
120
|
+
"high": 0,
|
|
121
|
+
"medium": 5,
|
|
122
|
+
"low": 0,
|
|
123
|
+
"kev": 0,
|
|
124
|
+
"ids": [
|
|
125
|
+
"toctou-fs:agentic-security-audit.js:55",
|
|
126
|
+
"toctou-fs:agentic-security-consistency.js:44",
|
|
127
|
+
"toctou-fs:agentic-security-consistency.js:66",
|
|
128
|
+
"toctou-fs:agentic-security.js:1141",
|
|
129
|
+
"toctou-fs:agentic-security.js:362"
|
|
130
|
+
]
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"timestamp": "2026-05-28T14:16:39.437Z",
|
|
134
|
+
"label": "scan",
|
|
135
|
+
"total": 5,
|
|
136
|
+
"critical": 0,
|
|
137
|
+
"high": 0,
|
|
138
|
+
"medium": 5,
|
|
139
|
+
"low": 0,
|
|
140
|
+
"kev": 0,
|
|
141
|
+
"ids": [
|
|
142
|
+
"toctou-fs:agentic-security-audit.js:55",
|
|
143
|
+
"toctou-fs:agentic-security-consistency.js:44",
|
|
144
|
+
"toctou-fs:agentic-security-consistency.js:66",
|
|
145
|
+
"toctou-fs:agentic-security.js:1146",
|
|
146
|
+
"toctou-fs:agentic-security.js:367"
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
"timestamp": "2026-05-28T14:16:53.162Z",
|
|
151
|
+
"label": "scan",
|
|
152
|
+
"total": 5,
|
|
153
|
+
"critical": 0,
|
|
154
|
+
"high": 0,
|
|
155
|
+
"medium": 5,
|
|
156
|
+
"low": 0,
|
|
157
|
+
"kev": 0,
|
|
158
|
+
"ids": [
|
|
159
|
+
"toctou-fs:agentic-security-audit.js:55",
|
|
160
|
+
"toctou-fs:agentic-security-consistency.js:44",
|
|
161
|
+
"toctou-fs:agentic-security-consistency.js:66",
|
|
162
|
+
"toctou-fs:agentic-security.js:1151",
|
|
163
|
+
"toctou-fs:agentic-security.js:367"
|
|
164
|
+
]
|
|
114
165
|
}
|
|
115
166
|
]
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"firstScanDate": "2026-05-26T04:00:10.482Z",
|
|
3
|
-
"lastScanDate": "2026-05-
|
|
4
|
-
"totalScans":
|
|
5
|
-
"daysCleanCritical":
|
|
6
|
-
"lastCleanDate": "2026-05-
|
|
3
|
+
"lastScanDate": "2026-05-28T14:16:53.192Z",
|
|
4
|
+
"totalScans": 10,
|
|
5
|
+
"daysCleanCritical": 3,
|
|
6
|
+
"lastCleanDate": "2026-05-28",
|
|
7
7
|
"lastCriticalDate": null,
|
|
8
8
|
"hasEverHadCritical": false,
|
|
9
|
-
"bestDaysCleanCritical":
|
|
9
|
+
"bestDaysCleanCritical": 3,
|
|
10
10
|
"totalFindingsAtFirstScan": 11,
|
|
11
11
|
"totalFindingsAtLastScan": 13,
|
|
12
12
|
"totalFixesInferred": 0,
|
package/bin/agentic-security.js
CHANGED
|
@@ -269,6 +269,11 @@ function renderV3Blocks(scan, flags) {
|
|
|
269
269
|
// Always-on machine output (R2). Vibecoder gets JSON only; pro gets JSON+SARIF+CSV.
|
|
270
270
|
async function writeMachineOutput(targetAbs, scan, meta, profile) {
|
|
271
271
|
const stateDir = path.join(targetAbs, '.agentic-security');
|
|
272
|
+
const { isSafeStateDir: _isSafe } = await import('../src/posture/state-dir.js');
|
|
273
|
+
if (!_isSafe(stateDir)) {
|
|
274
|
+
if (process.env.AGENTIC_SECURITY_DEBUG === '1') process.stderr.write(`[agentic-security] refusing to write machine output at ${stateDir} — no project marker\n`);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
272
277
|
await fsp.mkdir(stateDir, { recursive: true });
|
|
273
278
|
// Always JSON (used by /security-fix and /security-report).
|
|
274
279
|
await fsp.writeFile(path.join(stateDir, 'findings.json'),
|
|
@@ -495,14 +500,19 @@ async function cmdScan(args) {
|
|
|
495
500
|
else process.stdout.write(body + '\n');
|
|
496
501
|
|
|
497
502
|
// Persist last scan for /security-fix and /security-report
|
|
503
|
+
const { isSafeStateDir: _isSafeStateDir } = await import('../src/posture/state-dir.js');
|
|
498
504
|
const stateDir = path.join(path.resolve(target), '.agentic-security');
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
505
|
+
if (_isSafeStateDir(stateDir)) {
|
|
506
|
+
await fsp.mkdir(stateDir, { recursive: true });
|
|
507
|
+
const persistedScan = toJSON(scan, meta);
|
|
508
|
+
const lastScanBody = JSON.stringify(persistedScan, null, 2);
|
|
509
|
+
await fsp.writeFile(path.join(stateDir, 'last-scan.json'), lastScanBody);
|
|
510
|
+
try {
|
|
511
|
+
await fsp.writeFile(path.join(stateDir, 'last-scan.json.sig'), _signLastScan(lastScanBody));
|
|
512
|
+
} catch { /* non-fatal — sig file is best-effort */ }
|
|
513
|
+
} else {
|
|
514
|
+
if (process.env.AGENTIC_SECURITY_DEBUG === '1') process.stderr.write(`[agentic-security] refusing to write state at ${stateDir} — no project marker in ${path.resolve(target)}\n`);
|
|
515
|
+
}
|
|
506
516
|
|
|
507
517
|
// 0.14.0 — update streak / achievements after every full scan. Suppress
|
|
508
518
|
// streak side effects when the user only wants raw JSON output (CI piping).
|
|
@@ -587,6 +597,11 @@ async function cmdCi(args) {
|
|
|
587
597
|
|
|
588
598
|
// Persist the three CI artifacts.
|
|
589
599
|
const stateDir = path.join(targetAbs, '.agentic-security');
|
|
600
|
+
const { isSafeStateDir: _isSafeCi } = await import('../src/posture/state-dir.js');
|
|
601
|
+
if (!_isSafeCi(stateDir)) {
|
|
602
|
+
if (process.env.AGENTIC_SECURITY_DEBUG === '1') process.stderr.write(`[agentic-security] refusing to write CI artifacts at ${stateDir} — no project marker\n`);
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
590
605
|
await fsp.mkdir(stateDir, { recursive: true });
|
|
591
606
|
await fsp.writeFile(path.join(stateDir, 'findings.json'),
|
|
592
607
|
JSON.stringify(toJSON(scan, meta), null, 2));
|
package/dist/178.index.js
CHANGED
|
@@ -13,7 +13,7 @@ export const modules = {
|
|
|
13
13
|
/* harmony import */ var node_child_process__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1421);
|
|
14
14
|
/* harmony import */ var node_fs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3024);
|
|
15
15
|
/* harmony import */ var node_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6760);
|
|
16
|
-
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
16
|
+
/* harmony import */ var _engine_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9072);
|
|
17
17
|
// Time-travel + counterfactual scanning (v0.68).
|
|
18
18
|
//
|
|
19
19
|
// Two new modes that exploit the pure-input shape of runFullScan:
|