Add CI runner hardening audit#704
Conversation
Signed-off-by: Andrew Russell <arussell@nvidia.com>
📝 WalkthroughWalkthroughAdds a new GitHub Actions workflow that runs on pull requests, pushes to Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci-runner-hardening.yml:
- Around line 57-65: The deny-pattern list in the CI hardening workflow is
missing the equivalent Docker socket path, so audit checks can be bypassed via
/run/docker.sock. Update the pattern set used by the workflow’s
socket-blocking/audit logic to include /run/docker.sock alongside the existing
/var/run/docker.sock entry, keeping the change in the same denylist section that
references docker.sock and DOCKER_HOST patterns.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 948bdebe-fe71-4f4e-a61c-13aa492cad4e
📒 Files selected for processing (1)
.github/workflows/ci-runner-hardening.yml
| --privileged | ||
| /var/run/docker.sock | ||
| docker.sock: | ||
| docker.sock= | ||
| docker.sock/ | ||
| privileged: true | ||
| DOCKER_HOST=unix:// | ||
| DOCKER_HOST: unix:// | ||
| PATTERNS |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
Add /run/docker.sock to deny patterns to prevent audit bypass.
The audit currently blocks /var/run/docker.sock but misses /run/docker.sock, which allows equivalent Docker host socket access to pass undetected.
Suggested patch
--privileged
/var/run/docker.sock
+ /run/docker.sock
docker.sock:
docker.sock=
docker.sock/As per path instructions, .github/workflows/**: “Focus on security (secret handling, permissions) and correctness of build/test steps.”
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| --privileged | |
| /var/run/docker.sock | |
| docker.sock: | |
| docker.sock= | |
| docker.sock/ | |
| privileged: true | |
| DOCKER_HOST=unix:// | |
| DOCKER_HOST: unix:// | |
| PATTERNS | |
| --privileged | |
| /var/run/docker.sock | |
| /run/docker.sock | |
| docker.sock: | |
| docker.sock= | |
| docker.sock/ | |
| privileged: true | |
| DOCKER_HOST=unix:// | |
| DOCKER_HOST: unix:// | |
| PATTERNS |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci-runner-hardening.yml around lines 57 - 65, The
deny-pattern list in the CI hardening workflow is missing the equivalent Docker
socket path, so audit checks can be bypassed via /run/docker.sock. Update the
pattern set used by the workflow’s socket-blocking/audit logic to include
/run/docker.sock alongside the existing /var/run/docker.sock entry, keeping the
change in the same denylist section that references docker.sock and DOCKER_HOST
patterns.
Source: Path instructions
There was a problem hiding this comment.
Fixed in de5fbc7: added /run/docker.sock to the denylist next to /var/run/docker.sock so the audit catches both common Docker socket paths.
Signed-off-by: Andrew Russell <arussell@nvidia.com>
Summary
actions/checkout@v6SHA and disable persisted checkout credentials.Validation
SKIP=check-copyright-year pre-commit run --all-filesNotes
This guards the Isaac Teleop repository configuration. Runner provisioning changes outside this repository are handled separately by the runner owners.
Summary by CodeRabbit