Skip to content
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

Workflow for PR run checks to manage secret usage #71

Merged
merged 13 commits into from
Mar 8, 2024
Merged

Conversation

withinfocus
Copy link
Contributor

@withinfocus withinfocus commented Mar 1, 2024

🎟️ Tracking

Internal change.

📔 Objective

See https://michaelheap.com/access-secrets-from-forks/ for background. This provides a check-run.yml reusable workflow that becomes a need for the two new scanning workflows that use secrets. When invoked by non-members of the organization, the check workflow will fail and short-circuit the scanners, therefore not failing on secret access. A member can then review the change for safety and manually run the workflows that failed or were skipped. This can serve as a pattern across all our repos that use secrets in workflows and we better collaborate with external contributors.

⏰ Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) or informed the documentation team

🦮 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

@withinfocus withinfocus marked this pull request as ready for review March 1, 2024 22:13
@withinfocus withinfocus requested a review from a team as a code owner March 1, 2024 22:13
@withinfocus withinfocus requested a review from a team March 1, 2024 22:13
@withinfocus withinfocus marked this pull request as draft March 5, 2024 15:29
@withinfocus withinfocus marked this pull request as ready for review March 5, 2024 19:29
@@ -8,24 +8,33 @@ on:
- "rc"
- "hotfix-rc"
pull_request:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe we need pull_request, target should run on both forks and local PRs just in a different context https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on my testing it didn't work, but I'll remove that for the moment and we merge to see what really happens.

Copy link
Member

@Hinton Hinton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's test it.

@withinfocus withinfocus merged commit 5902526 into main Mar 8, 2024
2 checks passed
@withinfocus withinfocus deleted the check-run branch March 8, 2024 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants