Skip to content

[StepSecurity] Apply security best practices#719

Merged
pboling merged 2 commits into
ruby-oauth:mainfrom
step-security-bot:chore/GHA-182236-stepsecurity-remediation
May 19, 2026
Merged

[StepSecurity] Apply security best practices#719
pboling merged 2 commits into
ruby-oauth:mainfrom
step-security-bot:chore/GHA-182236-stepsecurity-remediation

Conversation

@step-security-bot

Copy link
Copy Markdown
Contributor

Summary

This pull request is created by StepSecurity at the request of @pboling. Please merge the Pull Request to incorporate the requested changes. Please tag @pboling on your message if you have any questions related to the PR.

Security Fixes

Least Privileged GitHub Actions Token Permissions

The GITHUB_TOKEN is an automatically generated secret to make authenticated calls to the GitHub API. GitHub recommends setting minimum token permissions for the GITHUB_TOKEN.

Pinned Dependencies

GitHub Action tags and Docker tags are mutable. This poses a security risk. GitHub's Security Hardening guide recommends pinning actions to full length commit.

Harden Runner

Harden-Runner is an open-source security agent for the GitHub-hosted runner to prevent software supply chain attacks. It prevents exfiltration of credentials, detects tampering of source code during build, and enables running jobs without sudo access. See how popular open-source projects use Harden-Runner here.

Harden runner usage

You can find link to view insights and policy recommendation in the build log

Please refer to documentation to find more details.

Maintain Code Quality with Pre-Commit

Pre-commit is a framework for managing and maintaining multi-language pre-commit hooks. Hooks can be any scripts, code, or binaries that run at any stage of the git workflow. Pre-commit hooks are useful for enforcing code quality, code formatting, and detecting security vulnerabilities.

Feedback

For bug reports, feature requests, and general feedback; please email support@stepsecurity.io. To create such PRs, please visit https://app.stepsecurity.io/securerepo.

Signed-off-by: StepSecurity Bot bot@stepsecurity.io

Signed-off-by: StepSecurity Bot <bot@stepsecurity.io>
@codecov

codecov Bot commented May 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (39ae48d) to head (148d716).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #719   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines          553       553           
  Branches       169       169           
=========================================
  Hits           553       553           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR applies security hardening updates across the repo’s GitHub Actions workflows (pinning action refs and adding runner hardening) and introduces a pre-commit configuration intended to improve local developer hygiene.

Changes:

  • Add step-security/harden-runner (egress audit mode) to many GitHub Actions workflows.
  • Pin several GitHub Actions dependencies to commit SHAs instead of mutable refs/tags.
  • Add a new .pre-commit-config.yaml with gitleaks + formatting/lint hooks.

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.pre-commit-config.yaml Adds pre-commit hooks configuration.
.github/workflows/ancient.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/auto-assign.yml Adds minimal workflow permissions; adds harden-runner; pins auto-assign action.
.github/workflows/caboose.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/codeql-analysis.yml Adds top-level contents: read; adds harden-runner; pins CodeQL + checkout actions.
.github/workflows/coverage.yml Adds harden-runner; pins checkout/setup-ruby and coverage-related actions.
.github/workflows/current.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/dep-heads.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/dependency-review.yml Adds harden-runner; pins checkout + dependency-review action.
.github/workflows/heads.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/jruby.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/legacy.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/license-eye.yml Adds harden-runner; pins checkout + skywalking-eyes action.
.github/workflows/locked_deps.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/macos.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/opencollective.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/scorecard-analysis.yml Adds harden-runner; pins checkout (already SHA-pinned).
.github/workflows/style.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/supported.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/unlocked_deps.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/unsupported.yml Adds harden-runner; pins checkout/setup-ruby.
.github/workflows/windows.yml Adds harden-runner; pins checkout/setup-ruby.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .pre-commit-config.yaml
Comment thread .pre-commit-config.yaml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: |7eter l-|. l3oling <peter.boling@gmail.com>
@pboling pboling merged commit 0bc1903 into ruby-oauth:main May 19, 2026
38 checks passed
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