Repository navigation
Give the OCSF allow decision its own class entry - #278
rocklambros merged 2 commits into
Conversation
The allow rule lived only in decision_class.description, under the old caption "Application Activity", and neither Trace page had a row for it. Add decision_class.allow_class with class_uid 6002, class_name "Application Lifecycle" and the fields an allow carries, add the row to events.md and extend_ocsf.md, and guard it in test_trace_mapping_defaults.py. The opt-in to Detection Finding stays. Fixes GenAI-Security-Project#198 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com>
|
This pull request's description says it closes #198, which is on the project roadmap. When it merges, GitHub closes that issue and the roadmap counts it as delivered. Please confirm the change delivers the whole issue before merging. |
|
Confirmed, this delivers all of #198. Part 1: the |
|
@rocklambros this is green and mergeable, and it delivers all of #198 as confirmed above. Could one of the code owners review it? |
rocklambros
left a comment
There was a problem hiding this comment.
Imran, OCSF 1.9.0 names class 6002 Application Lifecycle. Application Activity is its category, so your row has the right name and issue #198 had the category. I checked this at schema.ocsf.io. unmapped.acs.metadata also holds the evaluator, as you say, because evaluator sits in the response's metadata.
This closes issue #198. The row is in both tables. allow_class gives the class, the required fields, and where the disposition and the evaluator go. The issue accepted two classes if each one names its fields, so the Detection Finding opt-in can stay, and it works as it did before.
I merged this onto integration d9e3d5d and ran everything. Pytest gives 923 passed and 1 skipped, which is integration's count plus your new test. Integration's own tests also pass over your change. mkdocs build --strict is clean. The agt suite ran 1287 tests with 0 failures on Bun 1.3.11 and 1.3.14. Your test fails when I break the class id, the caption, unmapped.acs.decision, or the allow severity.
Two gaps remain after this PR. Neither one blocks this merge, because both were there before your change.
- A 6002 allow still needs
activity_idandapplicationto pass the OCSF validator. Also, onlyunmapped.acs.decisiontells it apart from the 6002 step event it gated. Both belong with the other 6002 rows in issue #235. - A late allow on 6002 has no
finding_info, andfinding_info.typesis where thelate_decisionmarker goes. That one is a question for Bar and Ariel.
Approving and merging.
19b1197
into
GenAI-Security-Project:integration
go generate ./internal/schema copies specification/ into the module, and TestSchemasMatchSpecification compares the two. Claude-Session: https://claude.ai/code/session_01NFeGFKPFpAQbJj5ZhbHkRy Signed-off-by: Konstantin Trunin <konstantin@trunin.com>
What changed
decision_classinocsf-mapping.jsongainsallow_class:class_uid6002,class_name"Application Lifecycle", andrequired_fieldsnaming where the disposition goes (unmapped.acs.decision), plusseverity_id,metadata.correlation_uidand the join pair. The evaluator rides inunmapped.acs.metadata, as on a 2004. The prose rule, which still said "Application Activity" after #258, now points at it.events.mdandextend_ocsf.mdget theDecision (allow)row, andtest_trace_mapping_defaults.pychecks the caption matches the 6002 rows.The opt-in to record allows as Detection Findings stays. Dropping it is a one-line follow-up if the Spec leads want one class.
Which issue does this implement
Fixes #198
Base branch
integrationType of change
Specification changes
status:accepted)Breaking for implementers? No. Every
class_uidand existing default is unchanged;activity_idfor 6002 stays with #235.I tested this
integrationat c82310buv run pytest -v: 888 passed, 1 skipped. The 10 failures and 30 errors are Windows-only (symlinks,ghshim) and identical on unmodifiedintegrationuv run mkdocs build --strictpassesChecklist
Security
🤖 Generated with Claude Code