-
Notifications
You must be signed in to change notification settings - Fork 14
Cleanup of workflow files for Zizmor changes #434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very quick pass through most of the content and I focused on the new Action itself.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good to me -- might want to sync with BRE before a full review with them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good, just had a few ⛏️ s. Another set of 👀 from a BRE member would probably be worth it.
|
Claude finished @mandreko-bitwarden's task —— View job PR Review: Workflow Cleanup for Zizmor ComplianceSummaryThis PR successfully implements workflow cleanup changes for zizmor and bwwl (Bitwarden Workflow Linter) compliance. The changes primarily focus on:
Overall Assessment: The PR is in good shape with most issues addressed. However, there is one critical issue that needs immediate attention before merging. Critical Issues❌ 1. Missing Environment Variables in check-run.ymlFile: Issue: The environment variable definitions for Problem: While Current code: - name: Check user permission
if: |
steps.get-permission.outputs.require-result == 'false'
&& github.triggering_actor != 'bw-ghapp[bot]'
env:
USER_PERMISSIONS: ${{ steps.get-permission.outputs.user-permission }}
run: |
echo "User ${GITHUB_TRIGGERING_ACTOR} does not have the necessary access for this repository."
echo "Current permission level is ${USER_PERMISSIONS}."
echo "Job originally triggered by ${GITHUB_ACTOR}."
exit 1Fix Required: - name: Check user permission
if: |
steps.get-permission.outputs.require-result == 'false'
&& github.triggering_actor != 'bw-ghapp[bot]'
env:
GITHUB_TRIGGERING_ACTOR: ${{ github.triggering_actor }}
GITHUB_ACTOR: ${{ github.actor }}
USER_PERMISSIONS: ${{ steps.get-permission.outputs.user-permission }}
run: |
echo "User ${GITHUB_TRIGGERING_ACTOR} does not have the necessary access for this repository."
echo "Current permission level is ${USER_PERMISSIONS}."
echo "Job originally triggered by ${GITHUB_ACTOR}."
exit 1Note: The author's comment suggests this is a false positive because these are GitHub runner variables. However, this is incorrect. GitHub context variables like Suggested Improvements🎨 1. Error Handling in _ephemeral_environment_manager.ymlFile: Current code: APP_NAME=$(argocd app list -o name | grep "${PR_NUMBER}")Issue: If no ArgoCD application matches the PR number, Suggested improvement: APP_NAME=$(argocd app list -o name | grep "${PR_NUMBER}" || true)
if [ -z "$APP_NAME" ]; then
echo "::error::No ArgoCD application found for PR ${PR_NUMBER}"
exit 1
fiThis provides clearer error messages when the expected application doesn't exist. 🎨 2. Multiple ArgoCD Application MatchesFile: Issue: If multiple ArgoCD applications contain the same PR number in their names, Suggested improvement: APP_NAME=$(argocd app list -o name | grep "${PR_NUMBER}" | head -1)This ensures only one match is used, making the behavior more predictable. Status of Previously Identified Issues✅ Fixed: Syntax Error in _ephemeral_environment_manager.ymlPrevious Issue: Line 193 had mismatched braces Status: RESOLVED - The current code correctly uses Good Practices Observed
Additional ObservationsShell Script ImprovementsThe PR includes several good shell scripting improvements:
Formatting ChangesThe prettier formatting has made several spacing improvements:
Security ConsiderationsThe Action Items for AuthorRequired Before Merge:
Recommended Improvements:
Changes Since Last ReviewNew in this review (since Claude's last review on 2025-10-21):
Previously identified issues that remain:
ConclusionThis PR makes valuable security and code quality improvements to align with zizmor and bwwl requirements. The changes are well-structured and follow best practices for GitHub Actions workflows. Recommendation: Request changes - The critical environment variable issue in Once the critical issue is resolved, this PR will be ready to merge. |
|




🎟️ Tracking
https://bitwarden.atlassian.net/browse/VULN-285
📔 Objective
Includes cleanup of workflow files to be compliant with zizmor and bwwl.
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes