Commit b0fe06d
feat: formal model + 15-test suite for security architecture SG invariants (#44590)
* Initial plan
* feat: add SG formal model, behavioral coverage map, and 15-test suite
- Add Formal Model section to specs/security-architecture-spec-summary.md
with TLA+/F*/Z3 invariants for SG-01 through SG-07 and the job
pipeline topology invariant
- Add Behavioral Coverage Map table (15 predicate → test function mappings)
- Add Generated Test Suite section referencing the new Go test file
- Create pkg/workflow/security_architecture_sg_formal_test.go with 15 tests:
TestFormalSG01_InputSanitizationInvariant
TestFormalSG02_AgentJobHasNoWritePermissions
TestFormalSG03_NetworkAllowlistEnforcement
TestFormalSG04_LeastPrivilegeBasePermissions
TestFormalSG05_SandboxIsolationPresence
TestFormalSG06_ThreatDetectionAuditArtifact
TestFormalSG07_FailSecureOnSecurityError
TestFormalBasicConformance_AllFourControls
TestFormalThreatDetection_EnabledByDefault
TestFormalThreatDetection_ExplicitDisable
TestFormalThreatDetection_ContinueOnErrorDefault
TestFormalStaged_HandlerRequiresNoWritePerms
TestFormalIDToken_OIDCVaultActionsRequireWriteScope
TestFormalPushFallback_DefaultsToTrue
TestFormalJobTopology_PipelineOrderEnforced
- Add Spec Maintenance Tasks entry tracking this work
- Regenerate affected lock file (.github/workflows/test-dispatcher.lock.yml)
Closes #44589
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* refactor: extract formalEmptyPermissionsYAML constant to remove duplication
Address code review: extract the repeated "permissions: {}" literal into a
shared package-level constant formalEmptyPermissionsYAML in the SG formal test
file, used by TestFormalSG02, TestFormalSG04, and TestFormalBasicConformance.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* docs(adr): add draft ADR-44590 for formal verification of security architecture invariants
Records the decision to adopt TLA+/F*/Z3 formal specification methods and
encode each of the 7 security guarantees as an executable Go unit test.
* fix: address review comments in SG formal test and spec invariants
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
* refactor: rename pipelineEdge to dependencyEdge for clarity
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>1 parent e930464 commit b0fe06d
3 files changed
Lines changed: 866 additions & 4 deletions
File tree
- docs/adr
- pkg/workflow
- specs
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
0 commit comments