fix(ci): replace dynamic secret access with explicit secret references#4151
fix(ci): replace dynamic secret access with explicit secret references#4151waleedlatif1 merged 2 commits intostagingfrom
Conversation
Resolves CodeQL "Excessive Secrets Exposure" warning by replacing secrets[matrix.ecr_repo_secret] with conditional expressions that reference only the specific secrets needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Build/tag steps are updated to use the resolved output ( Reviewed by Cursor Bugbot for commit 830454b. Configure here. |
Greptile SummaryThis PR replaces dynamic secret indexing ( Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[matrix.ecr_repo_secret] --> B{== 'ECR_APP'?}
B -- Yes --> C[secrets.ECR_APP]
C --> D{non-empty?}
D -- Yes --> G[ECR_REPO = ECR_APP value]
D -- No --> E
B -- No --> E{== 'ECR_MIGRATIONS'?}
E -- Yes --> F[secrets.ECR_MIGRATIONS]
F --> H{non-empty?}
H -- Yes --> I[ECR_REPO = ECR_MIGRATIONS value]
H -- No --> J
E -- No --> J{== 'ECR_REALTIME'?}
J -- Yes --> K[secrets.ECR_REALTIME]
K --> L{non-empty?}
L -- Yes --> M[ECR_REPO = ECR_REALTIME value]
L -- No --> N
J -- No --> N[ECR_REPO = '' terminal fallback]
G --> O[echo name=ECR_REPO to GITHUB_OUTPUT]
I --> O
M --> O
N --> O
O --> P[Build & push Docker image]
N -.->|empty repo name causes explicit build failure| P
Reviews (2): Last reviewed commit: "fix(ci): add explicit ECR_REALTIME guard..." | Re-trigger Greptile |
… injection - Prevent silent fallthrough to ECR_REALTIME for unrecognized secret keys - Move build-amd64 secret resolution to env: block matching build-dev pattern
|
@greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 830454b. Configure here.
Summary
secrets[matrix.ecr_repo_secret]with explicit conditional expressions referencing only the specific secrets needed (ECR_APP,ECR_MIGRATIONS,ECR_REALTIME)build-devandbuild-amd64jobsType of Change
Testing
Tested manually — verified YAML syntax and conditional logic
Checklist