Skip to content

First stage of implementing harden runner#2289

Merged
Kenny-Vilella merged 2 commits intonewton-physics:mainfrom
Kenny-Vilella:dev/kvilella/preliminary_use_harden_runner
Apr 2, 2026
Merged

First stage of implementing harden runner#2289
Kenny-Vilella merged 2 commits intonewton-physics:mainfrom
Kenny-Vilella:dev/kvilella/preliminary_use_harden_runner

Conversation

@Kenny-Vilella
Copy link
Copy Markdown
Member

@Kenny-Vilella Kenny-Vilella commented Apr 1, 2026

Description

Added harden-runner for three simple CI jobs:

  • minimal-import-test
  • check-lockfile
  • check-licenses

If it works well will add to more job.

Checklist

  • New or existing tests cover these changes
  • The documentation is up to date with these changes
  • CHANGELOG.md has been updated (if user-facing change)

Test plan

Tested on my fork, StepSecurity mention that it is stable over the last 1XX runs, so we should not expect any issue.

Summary by CodeRabbit

  • Chores
    • Strengthened security hardening across automated testing and deployment workflows by implementing stricter outbound network traffic controls. Updated GitHub Actions runner configurations to transition from monitoring mode to actively blocking unauthorized external connections, with allowlists preserving access to essential trusted services for package management and deployment.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 1, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yml

Review profile: CHILL

Plan: Pro

Run ID: be006fa0-62a7-4b1c-b47a-b16c513a2406

📥 Commits

Reviewing files that changed from the base of the PR and between c1acd46 and de09e92.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/pr.yml
  • .github/workflows/pr_license_check.yml

📝 Walkthrough

Walkthrough

This PR updates GitHub Actions runner hardening configurations across three workflow files, changing egress policies from audit mode to block mode and adding allowlists of specific endpoints for outbound network traffic.

Changes

Cohort / File(s) Summary
Runner Hardening Configuration
.github/workflows/ci.yml, .github/workflows/pr.yml, .github/workflows/pr_license_check.yml
Changed egress-policy from audit to block and added allowed-endpoints allowlists restricting outbound traffic to specific hosts on port 443 (PyTorch, PyPI, GitHub, Astral, and related endpoints). Updated step display names from "Harden the runner (Audit all outbound calls)" to "Harden Runner".

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested reviewers

  • shi-eric
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'First stage of implementing harden runner' directly aligns with the PR's main objective of adding harden-runner to three CI jobs as an initial integration step.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@shi-eric shi-eric added the automation Issues related to ci/cd and automation in general label Apr 1, 2026
@Kenny-Vilella Kenny-Vilella added this pull request to the merge queue Apr 2, 2026
Merged via the queue into newton-physics:main with commit 8af24b6 Apr 2, 2026
25 checks passed
@Kenny-Vilella Kenny-Vilella deleted the dev/kvilella/preliminary_use_harden_runner branch April 2, 2026 05:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automation Issues related to ci/cd and automation in general

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants