feat: add trust workflow and async deep-audit - #6
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 066d5cb75b
ℹ️ 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".
|
|
||
| const envelopeId = envelopeResponse?.envelope?.envelopeId; | ||
| if (envelopeId) { | ||
| const knownCatalogNamespaces = data.plugins.matched.flatMap(({ namespaces }) => namespaces ?? []); |
There was a problem hiding this comment.
Include core namespaces when evaluating trust mismatches
evaluateTrustEnvelope compares findings.namespaces against catalog.namespaces, but this call only passes namespaces from matched plugins. Since data.namespaces includes core namespaces like wp/v2 and oembed/1.0, normal scans will emit SCAN_CATALOG_MISMATCH warnings even when nothing is wrong, causing trust status to stay in a warning state and generating noisy remediation work.
Useful? React with 👍 / 👎.
| await updateDeepAuditJobState(jobId, { | ||
| status: 'running', | ||
| startedAt: new Date().toISOString(), | ||
| }); |
There was a problem hiding this comment.
Guard deep-audit state transition with error handling
The initial updateDeepAuditJobState(...running...) runs before the try/catch, so a transient DB failure here rejects out of the timer callback and is never converted to a terminal job state. In that case the job can remain queued forever, and clients polling for completed/failed/capped will keep waiting indefinitely.
Useful? React with 👍 / 👎.
Summary
Verification