Skip to content

Stop legacy parameter findings citing an unverified source, or none - #1

Merged
Krishcalin merged 1 commit into
mainfrom
baseline-citation-provenance
Sep 17, 2026
Merged

Krishcalin merged 1 commit into
mainfrom
baseline-citation-provenance

Conversation

@Krishcalin

Copy link
Copy Markdown
Owner

The 33 SecurityParamAuditor.BASELINE rules are the pre-3250501 set. Two provenance failures rode out on every finding they produced:

  • _details() stamped baseline_source only for the ECS rules, so a legacy finding sent source:"" into server/remediation.py and servicerequest.py and rendered a blank source cell.
  • The full refs list rode onto the finding, unverified legacy notes (68048, 2416093, 1408081, 510007, 2191612) and CIS clauses included. servicerequest ._basis() returns the first "Note" ref as the document SAP checks the request against, so an unverified SAP Note number was published into a customer->SAP request. CLAUDE.md forbids citing an unverified identifier.

Fixed at the single emit point in modules/security_params.py, so the offline reports, the console references list and the service request are all covered without any of them learning which ref is which:

  • _ref_is_verified() classifies against _UNVERIFIED_BASELINE_NOTES, a denylist of exactly the numbers the BASELINE comment already enumerates plus any CIS clause. A denylist, not an allowlist, so a legitimately sourced note like 3250501 or 1956086 is never dropped.
  • _public_refs() propagates verified refs verbatim, withholds the unverified ones, and falls back to the generic "SAP Security Baseline" CLAUDE.md prescribes when nothing verified remains, rather than a blank.
  • _source_label() stamps a verified baseline_source on every rule, at both the wrong-value and the not-set emit paths.

check_definition.references_json is upserted on each ingest, so re-scans clean historical rows and no server change is needed.

tests/test_baseline_provenance.py (88) covers the classifier, all 33 rules' public refs and source label, and the legacy emit path end to end, including that verified refs survive it (abap/path_normalization keeps both). Full suite 6086 passed / 16 skipped.

The 33 SecurityParamAuditor.BASELINE rules are the pre-3250501 set. Two
provenance failures rode out on every finding they produced:

- _details() stamped baseline_source only for the ECS rules, so a legacy
  finding sent source:"" into server/remediation.py and servicerequest.py
  and rendered a blank source cell.
- The full refs list rode onto the finding, unverified legacy notes (68048,
  2416093, 1408081, 510007, 2191612) and CIS clauses included. servicerequest
  ._basis() returns the first "Note" ref as the document SAP checks the
  request against, so an unverified SAP Note number was published into a
  customer->SAP request. CLAUDE.md forbids citing an unverified identifier.

Fixed at the single emit point in modules/security_params.py, so the offline
reports, the console references list and the service request are all covered
without any of them learning which ref is which:

- _ref_is_verified() classifies against _UNVERIFIED_BASELINE_NOTES, a denylist
  of exactly the numbers the BASELINE comment already enumerates plus any CIS
  clause. A denylist, not an allowlist, so a legitimately sourced note like
  3250501 or 1956086 is never dropped.
- _public_refs() propagates verified refs verbatim, withholds the unverified
  ones, and falls back to the generic "SAP Security Baseline" CLAUDE.md
  prescribes when nothing verified remains, rather than a blank.
- _source_label() stamps a verified baseline_source on every rule, at both the
  wrong-value and the not-set emit paths.

check_definition.references_json is upserted on each ingest, so re-scans clean
historical rows and no server change is needed.

tests/test_baseline_provenance.py (88) covers the classifier, all 33 rules'
public refs and source label, and the legacy emit path end to end, including
that verified refs survive it (abap/path_normalization keeps both). Full suite
6086 passed / 16 skipped.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Krishcalin
Krishcalin merged commit dd8c223 into main Sep 17, 2026
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant