df: comprehensive security v1 rule base (judgment-tier + invariant-linked authz) - #123
Merged
Conversation
…epair doubled frontmatter in completed prompt 048
…n), reword guide intro/three-tier framing, fix ../ links, update README/llms.txt/CLAUDE.md guide descriptions
…(odd fence count 57) Co-Authored-By: DeepSeek V4 Flash (Think Max)
…mprehensive-rules # Conflicts: # CHANGELOG.md
…red pending v0.50.0 release)
bborbe
marked this pull request as ready for review
August 23, 2026 21:23
…security/resource-ownership, not resource-access)
There was a problem hiding this comment.
All checks complete. Let me now produce the final verdict JSON.
Summary of findings:
- Mechanical funnel: 0 findings (clean)
- Step 4c-sel: 2 applicable rules (
go-security/resource-ownership,go-security/tenant-isolation— both@commits); 86 skipped; no Go source in diff so@commitsis the only applicable class - Step 4d-sel: selector clean — the applicable
@commitsrules requirego-security-specialistreview of actual Go code handling resources by ID; the diff touches only docs/prompts/specs — no resource handlers, no Go source, no authorization logic changed - Schema:
**Class**: <token>field documented,classkey inrules/index.jsonconfirmed, build-index.py updated correctly - Index: 180 entries (171 → 180, +9 new security entries), valid JSON, both
security-invariantentries have correctclasskey - Example JSON:
go-security/resource-ownershipwithclass: "security-invariant"— matches the fix committed in HEAD - Cross-references: all relative paths correct (
../go-security-linting.md,../teamvault-conventions.md,../rule-block-schema.md,docs/security/security-review-pipeline.md) - CHANGELOG: new entry present in
## Unreleased
{
"verdict": "approve",
"summary": "PR ships a comprehensive security v1 rule base across three enforcement tiers (mechanical, judgment, invariant). The diff adds 9 new judgment-tier security rules to docs/security/security-review-guide.md, extends rule-block-schema.md with the **Class** field, updates build-index.py to index it, and regenerates rules/index.json from 171 to 180 entries — all well-formed. The HEAD commit correctly fixes a dead rule ID in the schema's example JSON. No Go source files were changed, so the @commits security-invariant rules have no violations to flag in this diff.",
"comments": [],
"concerns_addressed": [
"security: new security-review-guide.md rule blocks correctly formed with owner go-security-specialist, enforcement_type judgment, and Class field — not an issue",
"security: rules/index.json class field on security-invariant entries (resource-ownership, tenant-isolation) correctly populated — not an issue",
"correctness: build-index.py Class field parsing added correctly (lowercase key matching) — not an issue",
"correctness: rule-block-schema.md Class field documented with example using go-security/resource-ownership (the fix from HEAD) — not an issue",
"correctness: schema example JSON is valid and uses correct rule ID (verified in HEAD) — not an issue",
"correctness: cross-references in security-review-guide.md use correct relative paths (../go-security-linting.md, ../teamvault-conventions.md, ../rule-block-schema.md) — not an issue"
]
}
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.
Summary
Spec 011 (
security-comprehensive-rules) — expand the coding security rule base from the foundational MUST-tier mechanical set to the comprehensive v1 rule set.docs/security/security-review-guide.md(ownergo-security-specialist, IDsgo-security/<slug>, MUST/SHOULD,**Trigger**: **/*.go): ssrf-user-controlled-url, xss-untrusted-html, deserialization-unsafe, open-redirect, webhook-verification (MUST); mass-assignment, insecure-defaults (SHOULD)go-security/resource-ownership+go-security/tenant-isolation(MUST,**Class**: security-invariant,**Trigger**: @commits, enforcement citingsecurity-review-pipeline.md) — fire with the derived session security modelscripts/build-index.pygains**Class**:field parsing → optionalclassindex key (byte-stable, non-perturbing);docs/rule-block-schema.mddocuments the new field + keyrules/index.jsonregenerated 171 → 180 entries; all existing entries byte-stable; citations validate (existing + new)rules/security/{go,python,node}/target, go-first v1 stays flat)## Unreleasedfeat bulletVerification
make precommitgreen (check-links/check-json/check-index/check-coverage/check-acceptance/check-rule-tests)make check-indexgreen;build-index.py | jq 'length'= 180;has("class")= 2validate-citations.sh(findings 3, dropped 0)Out of scope: task-5 Go agent (parallel session),
--securitywiring (v0.49.0), verifier/citations (v0.48.0).