Repository navigation
Conversation
Add xerj_common::cyber_finding: one typed finding (scenario, CWE, source span or endpoint location, severity/CVSS, corpus evidence refs, status, confidence/abstain) shared by the cyber pack scenarios. Non-abstained findings must cite evidence; unsupported findings become explicit abstentions when a report is finalized. Black-box and exploitability findings, and any endpoint location, require a ScopeGuard and echo the declared work order. Reports carry an RFC 8785 SHA-256 receipt. Expose hub_evidence::jcs_canonicalize and crate-visible validators for reuse. Refs xerj-org#2767, xerj-org#2769 Signed-off-by: Raghuvar Karthik Durga <177662415+drk-ram@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes, and why
Adds the shared
xerj_common::cyber_findingschema and evidence-gated report that #2767 lists as a shared piece for every cyber scenario, with a spec indocs/cyber-finding.md.CyberFinding: id, scenario (code_review,blackbox,fuzz_plan,exploitability,score,advisory), title, CWE, location (source_spanfor Cyber pack: cyber.code_review (taint/sink-guided source review) #2771,endpointfor Cyber pack: cyber.blackbox (attack-surface mapping and test planning, authorized targets only) #2772), severity, CVSS vector/score,evidence[]of corpus references (corpus, record id, kind advisory/fix_commit/poc/pattern, 40-hex pin, fetch date, optional pinned citation), status, confidence and abstain.validate()refuses a non-abstained finding with empty evidence;CyberFindingReport::finalizeturns it into an explicit abstention instead of guessing. Malformed locations (traversal, control characters, bad line ranges), CWEs, evidence pins/dates and score/severity mismatches are errors.blackbox,exploitabilityand any endpoint finding require acyber_scope::ScopeGuardviaverify_with_scope; the window, trusted origin and every endpoint target are checked, an out-of-scope target refuses the whole report, and the work order is echoed in the report.finalizerefuses these findings without a scope.report_sha256is the SHA-256 of the RFC 8785 canonical form (scope included, digest excluded).verify_jsonre-checks all invariants and the digest.hub_evidenceexposesjcs_canonicalizeand crate-visible validators for reuse; no behaviour change there.This is a typed library primitive; it is not a registered recipe, MCP tool, or scanner, and sends no traffic. Scope stays limited to
engine/crates/xerj-common/,docs/andCHANGELOG.md.Refs #2767, #2769
Evidence
Checks
cargo fmt --all(CI runsrustfmt --checkandclippy -D warnings) -cargo fmt -p xerj-common --checkpassescargo build --release -j 32 -p <crate>- not runcargo test -p <crate>passes -cargo test -p xerj-common --lib402 passeddocs/cyber-finding.md,CHANGELOG.mddocs/CONTRIBUTION_REVIEW.md- not completedNot run: release build, ES-YAML conformance, workspace-wide tests, recipe-runner integration (the runner does not exist yet).
Provenance
InputOrigincorrectly and supply a trusted clock; the digest proves integrity only, not that corpus citations are true.