feat: resolve policy evaluations from CAS in workflow-run View API#2953
Open
migmartri wants to merge 1 commit intochainloop-dev:mainfrom
Open
feat: resolve policy evaluations from CAS in workflow-run View API#2953migmartri wants to merge 1 commit intochainloop-dev:mainfrom
migmartri wants to merge 1 commit intochainloop-dev:mainfrom
Conversation
7649a0c to
be91cda
Compare
There was a problem hiding this comment.
1 issue found across 6 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="app/controlplane/internal/service/workflowrun.go">
<violation number="1" location="app/controlplane/internal/service/workflowrun.go:102">
P1: Authorize policy-evaluation bundles before serving a cache hit. As written, a digest warmed by one org can be returned to another request without running the CAS org/public access check.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
be91cda to
382dc2f
Compare
Update WorkflowRunService.View() to resolve policy evaluations from the CAS-stored bundle (via PolicyEvaluationsRef) instead of relying solely on inline attestation predicate data. This prepares consumers for the eventual removal of inline policy evaluation content. On any CAS resolution failure, gracefully falls back to inline evaluations with a warning log. Closes chainloop-dev#2950 Signed-off-by: Miguel Martinez Trivino <miguel@chainloop.dev>
382dc2f to
ffc1981
Compare
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
WorkflowRunService.View()now resolves policy evaluations from the CAS-stored bundle (PolicyEvaluationsRef) instead of relying on inline attestation predicate dataPolicyEvaluationsFromBundlehelper and exportedRenderEvaluationin the renderer packagecache.Cache[[]byte]infrastructure (NATS KV or in-memory LRU)Closes #2950