feat(production): add deployable Direct-Agent profile - #17
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a supported “Direct-Agent v1” production composition (v1.0.0 surface) that bundles role-separated trust/revocation snapshots, signed attestation-result appraisal, and distributed replay protection, along with an independent HTTPS “protected-change” consumer and CI gates.
Changes:
- Adds
pkg/productionwith a fail-closed verification composition, TLS-derived binding helper, signed attestation-result policy, and a TLS Redis/ValkeySET NX PXreplay adapter. - Adds an independent mTLS HTTPS consumer example (
examples/protected-change-consumer) with E2E positive/negative coverage. - Documents the supported API/compat policy and the fixed production deployment profile; updates CI and security-red-team workflow scopes accordingly.
Reviewed changes
Copilot reviewed 19 out of 21 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates release/evidence wording and points to new API/profile docs and production components. |
| PUBLICATION_TODO.md | Defines supported v1 surface and clarifies what remains experimental/out of scope. |
| pkg/production/redis.go | Implements TLS-only Redis/Valkey SETNX replay adapter with bounded RESP handling. |
| pkg/production/redis_test.go | Adds TLS SETNX race + config-rejection tests for the Redis/Valkey adapter. |
| pkg/production/profile.go | Adds supported production composition that verifies tokens, policy, attestation, and commits replay state. |
| pkg/production/profile_test.go | Adds unit/negative tests ensuring fail-closed behavior and no replay commit on failed gates. |
| pkg/production/binding.go | Adds BindingFromTLS deriving expected binding from TLS session + canonical action + nonce. |
| pkg/production/attestation.go | Adds signed attestation-result type and policy checks (key/policy/measurement/binder/time). |
| Makefile | Extends security gate targets to include production and consumer packages. |
| examples/protected-change-consumer/README.md | Documents the consumer boundary and how to run integration tests. |
| examples/protected-change-consumer/e2e_test.go | Adds full mTLS request-boundary E2E tests (positive + negative cases). |
| examples/protected-change-consumer/app.go | Implements the protected-change HTTP consumer using pkg/production. |
| docs/SSOT.md | Updates SSOT to reference the supported production composition and profile doc. |
| docs/production-deployment-profile.md | Adds the fixed “protected-change-v1” production deployment profile specification. |
| docs/live-red-team-report.md | Updates report to include production extension coverage and new test evidence. |
| docs/API_COMPATIBILITY.md | Defines supported Go API surface and compatibility policy starting at v1.0.0. |
| CHANGELOG.md | Adds v1.0.0 changelog entry summarizing the supported production surface. |
| .github/workflows/security-red-team.yaml | Expands red-team workflow path filters and packages under test. |
| .github/workflows/main.yaml | Adds CI steps to test pkg/production and the consumer integration package. |
Files not reviewed (2)
- internal/proto/attestation-agent/attestation-agent.pb.go: Generated file
- internal/proto/attestation/v1/attestation.pb.go: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| return nil, errors.New("invalid array count") | ||
| } | ||
| out := make([]string, count) | ||
| for i := range count { |
Comment on lines
+394
to
+397
| func testHash(value string) string { | ||
| digest := sha256.Sum256([]byte(value)) | ||
| return "sha256:" + hex.EncodeToString(digest[:]) | ||
| } |
| var winners atomic.Int32 | ||
| var wg sync.WaitGroup | ||
| errCh := make(chan error, workers) | ||
| for range workers { |
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
Changes
Testing
Notes