How step-security/harden-runner works
Harden-Runner is a GitHub Actions security monitor for CI/CD runners. A workflow invokes the action; its runtime has a main step and setup/cleanup steps, while the README describes monitoring network and file activity and presenting security insights. The sampled sources show entry-point checks, cleanup dispatch, policy and TLS API helpers, and summary retrieval. Setup and agent installation are substantial product stages, but their implementation was not sampled, so their internal connections are omitted. README-described monitoring capabilities are retained without asserting unsampled call paths.
Main entry points: index.ts Action entry · cleanup.ts Runner cleanup · tls-inspect.ts TLS status check · common.ts Runtime reporting
Components 18
Action runtime
- Action entry
src/index.ts - Runner setup
src/setup.ts - Runner cleanup
src/cleanup.ts - Agent installation
src/install-agent.ts - Runner checks
src/utils.ts - ARC detection
src/arc-runner.ts
Policy and configuration
- Runtime configuration
src/configs.ts - Policy retrieval
src/policy-utils.ts - Bravo configuration
src/bravo-config.ts - Configuration types
src/interfaces.ts - Agent verification
src/checksum.ts
Runner monitoring
- TLS status check
src/tls-inspect.ts - Runtime security agent
- Agent cache support
src/cache.ts
Security insights
- Runtime reporting
src/common.ts
Other components
- GitHub workflow
- StepSecurity API
- Security insights
Connections 16
- GitHub workflow → Action entry: invokes
README.md - Action entry → Runtime reporting: prints insights link
src/index.ts - Action entry → TLS status check: checks runner
src/index.ts - Action entry → Runner checks: checks platform
src/index.ts - Runner cleanup → Runtime reporting: adds summary
src/cleanup.ts - Runner cleanup → TLS status check: checks runner
src/cleanup.ts - Runner cleanup → ARC detection: checks ARC
src/cleanup.ts - Runner cleanup → Runner checks: checks platform
src/cleanup.ts - Action entry → StepSecurity API: configures API URL
src/index.ts - Runtime reporting → StepSecurity API: fetches summary
src/common.ts - TLS status check → StepSecurity API: checks TLS status
src/tls-inspect.ts - Policy retrieval → StepSecurity API: fetches policy
src/policy-utils.ts - GitHub workflow → Runner setup: sets up runner
README.md - GitHub workflow → Runner cleanup: completes run
README.md - Runtime security agent → Security insights: provides monitoring insights
README.md - GitHub workflow → Security insights: reviews results
README.md