feat(dotnet): credential injection and offload (#2535)#2574
Closed
Ricky-G wants to merge 3 commits into
Closed
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
🤖 AI Agent: security-scanner — View detailsNo security issues found. |
🤖 AI Agent: test-generator — `agent-governance-dotnet/src/AgentGovernance/Security/CredentialVault.cs`
|
🤖 AI Agent: breaking-change-detector — API CompatibilityAPI Compatibility
|
🤖 AI Agent: code-reviewer — Action Items:TL;DR: 0 blockers, 1 warning. Solid implementation with minor interoperability concern.
Action Items:
Warnings:
|
🤖 AI Agent: docs-sync-checker — Docs SyncDocs Sync
Please address these issues to ensure documentation is in sync. |
|
🟡 Contributor Check: MEDIUM
Automated check by AGT Contributor Check. |
PR Review Summary
Verdict: |
…2535) Port the Python credential vault primitive (#2481 / #2534) to the .NET SDK with full API parity. Library-only; agt cred remains the canonical CLI. Surfaces in AgentGovernance.Security namespace: - CredentialVault, CredentialInjector, CredentialProfile, CredentialHandle, DenyReceipt, VaultAuditEvent, CredentialAudit.Digest. Security properties match the Python reference: opaque handles, action-class scoping, workflow policy runs before vault read, allowlist-gated placeholders (MCP metadata untrusted), deterministic DenyReceipt, value-free audit events, rotation preserves handle name. Encryption: AES-256-GCM via System.Security.Cryptography.AesGcm with 12-byte random nonce prefixed to ciphertext (and 16-byte tag appended). Not currently interoperable with the Python SDK's Fernet format -- cross-language spec tracked in #2535. Tests: 27 xUnit cases. dotnet build clean. dotnet test passes. Signed-off-by: Ricky Gummadi <ricky.gummadi@outlook.com>
42e55b7 to
ccfcbef
Compare
Dispose MemoryStream in audit digest, use LINQ projections requested by code quality, simplify Put record construction with a conditional expression, switch temp path construction to Path.Join, and add dotnet credential vault spell-check terms. Signed-off-by: Ricky Gummadi <ricky.gummadi@outlook.com>
Member
|
Taken in via #2581 (rebased on current main, cspell conflicts resolved). Thanks for the dotnet credential vault implementation! |
13 tasks
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
.NET port of the credential vault primitive landed for Python in #2534. Part of #2535.
Agents reference secrets via opaque
{{cred:NAME}}placeholders only; resolved values stay inside the trust boundary. Library-only —agt credremains the canonical CLI.Design parity with the Python reference
CredentialHandleCredentialVault— AES-256-GCM viaSystem.Security.Cryptography.AesGcmCredentialProfileInjectionOptions.PolicyCheckInjectionOptions.AllowedHandlesDenyReceiptVaultAuditEvent,CredentialAudit.DigestCredentialVault.RotateInjectHeaders/InjectToolArgs/InjectEnvChanges
agent-governance-dotnet/src/AgentGovernance/Security/CredentialVault.csagent-governance-dotnet/tests/AgentGovernance.Tests/CredentialVaultTests.csTesting
dotnet build AgentGovernance.sln— cleandotnet test --filter "FullyQualifiedName~Credential"— 27 passedWire format
AES-256-GCM with a 12-byte random nonce prefixed to the ciphertext (16-byte tag appended). Not currently interoperable with the Python SDK's Fernet format — cross-language interop spec is the remaining sub-task on #2535.
References