Harden Zyra Shield trusted authorization and evidence - #42
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83de63ed02
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!grant || !grant.capabilities.includes(untrustedRequest.capability)) { | ||
| return res.status(403).json({ |
There was a problem hiding this comment.
Audit grant-registry denials before returning
When an authenticated caller requests an unregistered agent or capability, this early return bypasses the createAuditLog call below. These denied authorization attempts therefore leave neither the organization-scoped audit record nor the evidence hash produced for every other Shield decision, creating a monitoring gap specifically for attempts against the trusted grant boundary; construct and persist the denial before sending the 403 response.
Useful? React with 👍 / 👎.
Superseded by #41, which implements the same three security repairs on the primary agent branch. Closed to avoid conflicting duplicate changes.