-
Notifications
You must be signed in to change notification settings - Fork 0
Update GitHub Actions, add zizmor security linter, and configure Dependabot #16
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
705d0f0
Update GitHub Actions to latest major versions
dduugg 226f279
Add zizmor GitHub Actions security linter
dduugg 40c9e88
Fix zizmor-action version to v0.5.3
dduugg 589378a
Add Dependabot config for GitHub Actions updates
dduugg 87746e2
Pass .zizmor.yml config to zizmor-action
dduugg 7207b68
Pin all actions to SHA hashes and remove blanket zizmor disables
dduugg ee1f5d8
Clean up zizmor workflow style to match other workflows
dduugg a937aaa
Expand README with workflow documentation and usage examples
dduugg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: / | ||
| schedule: | ||
| interval: monthly | ||
| cooldown: | ||
| default-days: 7 | ||
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| name: GitHub Actions Security Analysis | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| branches: ["**"] | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| zizmor: | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write | ||
| contents: read | ||
| actions: read | ||
| steps: | ||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Run zizmor | ||
| uses: zizmorcore/zizmor-action@b1d7e1fb5de872772f31590499237e7cce841e8e # v0.5.3 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,61 @@ | ||
| # shared-config | ||
| # shared-config | ||
|
|
||
| Shared reusable GitHub Actions workflows for [rubyatscale](https://github.com/rubyatscale) gems. | ||
|
|
||
| ## Workflows | ||
|
|
||
| ### Reusable workflows (`workflow_call`) | ||
|
|
||
| These workflows are called from individual gem repos via `uses: rubyatscale/shared-config/.github/workflows/<name>.yml@main`. | ||
|
|
||
| | Workflow | Description | | ||
| |----------|-------------| | ||
| | **CI** (`ci.yml`) | Runs tests across Ruby 3.2–4.0, Sorbet type checking, and linting (RuboCop). Test and linter commands are configurable via inputs. | | ||
| | **CD** (`cd.yml`) | Publishes the gem to RubyGems and creates a GitHub Release on successful main builds. | | ||
| | **Stale** (`stale.yml`) | Marks issues and PRs as stale after 180 days of inactivity, then closes them after 7 more days. | | ||
| | **Triage** (`triage.yml`) | Labels new issues with `triage`. | | ||
|
|
||
| ### Repository workflows | ||
|
|
||
| | Workflow | Description | | ||
| |----------|-------------| | ||
| | **zizmor** (`zizmor.yml`) | Runs the [zizmor](https://github.com/zizmorcore/zizmor) security linter against all workflow files on every push and PR. | | ||
|
|
||
| ## Usage | ||
|
|
||
| In a gem repo, create a workflow that calls the shared workflow: | ||
|
|
||
| ```yaml | ||
| # .github/workflows/ci.yml | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| ci: | ||
| uses: rubyatscale/shared-config/.github/workflows/ci.yml@main | ||
| ``` | ||
|
|
||
| ### CI inputs | ||
|
|
||
| | Input | Default | Description | | ||
| |-------|---------|-------------| | ||
| | `test-command` | `bundle exec rspec` | Command to run tests | | ||
| | `linter-command` | `bundle exec rubocop` | Command to run the linter | | ||
|
|
||
| ### Required secrets | ||
|
|
||
| The **CD** workflow requires the following secrets in the calling repo: | ||
|
|
||
| - `GUSTO_GIT_EMAIL` / `GUSTO_GIT_NAME` — Git identity for tagging | ||
| - `RUBYGEMS_API_KEY` — API key for publishing to RubyGems | ||
| - `SLACK_WEBHOOK_URL` — Incoming webhook URL for failure notifications (used by both CI and CD) | ||
|
|
||
| ## Security | ||
|
|
||
| - All action references are pinned to SHA hashes | ||
| - [zizmor](https://github.com/zizmorcore/zizmor) runs on every PR to lint workflows for security issues | ||
| - [Dependabot](https://docs.github.com/en/code-security/dependabot) is configured for monthly GitHub Actions updates |
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.
Uh oh!
There was an error while loading. Please reload this page.