@clear-capabilities/agentic-security-scanner 0.195.25 → 0.195.27
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 +27 -0
- package/bin/agentic-security.js +13 -3
- package/dist/396.index.js +936 -0
- package/dist/5752.index.js +15 -2
- package/dist/7838.index.js +22 -0
- package/dist/8218.index.js +19 -2
- package/dist/{809c900a90284017aaff.json → 90ebba38d8860ec77376.json} +4 -4
- package/dist/9382.index.js +315 -174
- package/dist/9560.index.js +19 -2
- package/dist/agentic-security.mjs +9 -9
- package/dist/agentic-security.mjs.sha256 +1 -1
- package/package.json +4 -4
- package/src/context-intelligence/CLAUDE.md +4 -0
- package/src/context-intelligence/entrypoints.js +141 -9
- package/src/context-intelligence/imports.js +1 -1
- package/src/context-intelligence/review.js +8 -3
- package/src/engine.js +10 -0
- package/src/lineage/CLAUDE.md +4 -0
- package/src/lineage/graph-builder.js +8 -0
- package/src/lineage/index.js +2 -0
- package/src/posture/CLAUDE.md +10 -2
- package/src/posture/custom-rules.js +7 -2
- package/src/posture/dag-commands.js +15 -2
- package/src/posture/provenance/coordinator.js +6 -2
- package/src/posture/provenance/dag-walk.js +7 -3
- package/src/posture/provenance/git-evidence.js +21 -0
- package/src/posture/provenance/origin-resolver.js +16 -2
- package/src/posture/provenance/providers/github.js +6 -3
- package/src/posture/provenance/providers/gitlab.js +5 -3
- package/src/posture/rule-compiler/cli.js +76 -21
- package/src/posture/rule-compiler/negative-corpus.js +39 -0
- package/src/posture/rule-compiler/promotion.js +21 -0
- package/src/posture/rule-compiler/regression.js +39 -9
- package/src/posture/rule-compiler/store.js +72 -6
- package/src/server/graph-loader.js +19 -2
package/dist/9560.index.js
CHANGED
|
@@ -5812,7 +5812,7 @@ function findSiblings({ root, finding, scanFindings = [], limits = SIBLING_LIMIT
|
|
|
5812
5812
|
|
|
5813
5813
|
/**
|
|
5814
5814
|
* @param {string} scanRoot
|
|
5815
|
-
* @returns {{ok:true, graph:object} | {ok:false, reason:'missing'|'unsigned'|'tampered'|'malformed', message:string}}
|
|
5815
|
+
* @returns {{ok:true, graph:object} | {ok:false, reason:'missing'|'unsigned'|'tampered'|'malformed'|'wrong-revision', message:string}}
|
|
5816
5816
|
*
|
|
5817
5817
|
* Four, and only four, distinct failure reasons — each with its own clear
|
|
5818
5818
|
* message so an operator knows exactly what to do next:
|
|
@@ -5829,7 +5829,7 @@ function findSiblings({ root, finding, scanFindings = [], limits = SIBLING_LIMIT
|
|
|
5829
5829
|
* valid JSON. Should not happen from a normal scan; the
|
|
5830
5830
|
* file may be corrupted on disk after signing.
|
|
5831
5831
|
*/
|
|
5832
|
-
function loadSignedGraph(scanRoot) {
|
|
5832
|
+
function loadSignedGraph(scanRoot, { expectRevision = null } = {}) {
|
|
5833
5833
|
const graphPath = (0,_posture_state_dir_js__WEBPACK_IMPORTED_MODULE_1__.statePath)(scanRoot, 'lineage-graph.json');
|
|
5834
5834
|
const sigPath = graphPath + '.sig';
|
|
5835
5835
|
|
|
@@ -5879,6 +5879,23 @@ function loadSignedGraph(scanRoot) {
|
|
|
5879
5879
|
};
|
|
5880
5880
|
}
|
|
5881
5881
|
|
|
5882
|
+
// GA-03.7 (0.195.26): wrong-revision refusal. A caller that knows which
|
|
5883
|
+
// revision it expects (`dataflow view --expect-revision`) gets a graph
|
|
5884
|
+
// only when the graph records that revision; a graph that records none
|
|
5885
|
+
// cannot prove it and is refused for the same reason, never served on
|
|
5886
|
+
// the hope that it matches.
|
|
5887
|
+
if (expectRevision) {
|
|
5888
|
+
const have = graph && graph.scope && graph.scope.revision ? graph.scope.revision.commit : null;
|
|
5889
|
+
if (have !== expectRevision) {
|
|
5890
|
+
return {
|
|
5891
|
+
ok: false,
|
|
5892
|
+
reason: 'wrong-revision',
|
|
5893
|
+
message: have
|
|
5894
|
+
? `Lineage graph at ${graphPath} was built from revision ${have}, not the expected ${expectRevision}. Re-run the scan on the expected revision.`
|
|
5895
|
+
: `Lineage graph at ${graphPath} records no revision, so it cannot be shown to match the expected ${expectRevision}. Re-run the scan inside the repository (AGENTIC_SECURITY_LINEAGE_DEEP=1) so the graph records its revision.`,
|
|
5896
|
+
};
|
|
5897
|
+
}
|
|
5898
|
+
}
|
|
5882
5899
|
return { ok: true, graph };
|
|
5883
5900
|
}
|
|
5884
5901
|
|