Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: step-security/harden-runner
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.9.0
Choose a base ref
...
head repository: step-security/harden-runner
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.9.1
Choose a head ref
  • 14 commits
  • 19 files changed
  • 3 contributors

Commits on Jul 18, 2024

  1. Bump step-security/harden-runner from 2.8.1 to 2.9.0

    Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.8.1 to 2.9.0.
    - [Release notes](https://github.com/step-security/harden-runner/releases)
    - [Commits](17d0e2b...0d38121)
    
    ---
    updated-dependencies:
    - dependency-name: step-security/harden-runner
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jul 18, 2024
    Copy the full SHA
    657cae2 View commit details

Commits on Jul 19, 2024

  1. Merge pull request #439 from step-security/dependabot/github_actions/…

    …step-security/harden-runner-2.9.0
    
    Bump step-security/harden-runner from 2.8.1 to 2.9.0
    varunsh-coder authored Jul 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d7cf128 View commit details
  2. Bug fixes

    Update enterprise agent and don't show certain domains in markdown
    varunsh-coder committed Jul 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    89c04c1 View commit details
  3. Add . at end of domain patterns

    varunsh-coder committed Jul 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0fe20c9 View commit details
  4. Bump github/codeql-action from 2.13.4 to 3.25.13

    Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.13.4 to 3.25.13.
    - [Release notes](https://github.com/github/codeql-action/releases)
    - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
    - [Commits](github/codeql-action@cdcdbb5...2d79040)
    
    ---
    updated-dependencies:
    - dependency-name: github/codeql-action
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jul 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5f95e05 View commit details

Commits on Jul 23, 2024

  1. Bump step-security/publish-unit-test-result-action from 1 to 2

    Bumps [step-security/publish-unit-test-result-action](https://github.com/step-security/publish-unit-test-result-action) from 1 to 2.
    - [Release notes](https://github.com/step-security/publish-unit-test-result-action/releases)
    - [Commits](step-security/publish-unit-test-result-action@v1...v2)
    
    ---
    updated-dependencies:
    - dependency-name: step-security/publish-unit-test-result-action
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jul 23, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f2823ee View commit details
  2. Merge pull request #442 from step-security/dependabot/github_actions/…

    …step-security/publish-unit-test-result-action-2
    
    Bump step-security/publish-unit-test-result-action from 1 to 2
    varunsh-coder authored Jul 23, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8e7dd2c View commit details
  3. Merge branch 'main' into dependabot/github_actions/github/codeql-acti…

    …on-3.25.13
    varunsh-coder authored Jul 23, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1938ffc View commit details

Commits on Jul 24, 2024

  1. Merge pull request #441 from step-security/dependabot/github_actions/…

    …github/codeql-action-3.25.13
    
    Bump github/codeql-action from 2.13.4 to 3.25.13
    varunsh-coder authored Jul 24, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    f0db2aa View commit details

Commits on Jul 29, 2024

  1. logging step

    h0x0er committed Jul 29, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    727d06a View commit details
  2. update dist

    varunsh-coder committed Jul 29, 2024
    Copy the full SHA
    23c8215 View commit details
  3. Merge pull request #446 from h0x0er/log-step

    Log action steps
    varunsh-coder authored Jul 29, 2024
    Copy the full SHA
    deb3383 View commit details

Commits on Aug 5, 2024

  1. Merge branch 'main' into rc-11

    varunsh-coder authored Aug 5, 2024
    Copy the full SHA
    c79be45 View commit details
  2. Merge pull request #440 from step-security/rc-11

    v2.9.1
    varunsh-coder authored Aug 5, 2024
    Copy the full SHA
    5c7944e View commit details
2 changes: 1 addition & 1 deletion .github/workflows/canary.yml
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ jobs:
permissions:
contents: write
steps:
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v1
- uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v1
with:
egress-policy: audit
allowed-endpoints:
2 changes: 1 addition & 1 deletion .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@ jobs:
pull-requests: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: block
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

@@ -50,7 +50,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@cdcdbb579706841c47f7063dda365e292e5cad7a
uses: github/codeql-action/init@2d790406f505036ef40ecba973cc774a50395aac
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@@ -61,7 +61,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@cdcdbb579706841c47f7063dda365e292e5cad7a
uses: github/codeql-action/autobuild@2d790406f505036ef40ecba973cc774a50395aac

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@@ -75,4 +75,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@cdcdbb579706841c47f7063dda365e292e5cad7a
uses: github/codeql-action/analyze@2d790406f505036ef40ecba973cc774a50395aac
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit

4 changes: 2 additions & 2 deletions .github/workflows/recurring-int-tests.yml
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

@@ -28,7 +28,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs

2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ jobs:
permissions:
contents: write
steps:
- uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6
- uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c
with:
egress-policy: audit
allowed-endpoints:
4 changes: 2 additions & 2 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ jobs:

steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit

@@ -62,6 +62,6 @@ jobs:

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@cdcdbb579706841c47f7063dda365e292e5cad7a # tag=v1.0.26
uses: github/codeql-action/upload-sarif@2d790406f505036ef40ecba973cc774a50395aac # tag=v1.0.26
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
disable-sudo: true
egress-policy: audit
@@ -39,7 +39,7 @@ jobs:
run: npm test -- --coverage
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
- name: Publish Test Results
uses: step-security/publish-unit-test-result-action@v1
uses: step-security/publish-unit-test-result-action@v2
if: always()
with:
files: |
10 changes: 8 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions dist/post/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/post/index.js.map

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions dist/pre/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/pre/index.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/checksum.ts
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ export function verifyChecksum(downloadPath: string, is_tls: boolean) {

if (is_tls) {
expectedChecksum =
"e45b85e29216eb1d217aad368bdb056bbd868a308925e7b2cf9133b06ab435d0"; // checksum for tls_agent
"fa9defcf9e125a62cb29747574d6a07aee4f04153e7bce4a3c7ce29681469e92"; // checksum for tls_agent
}

if (checksum !== expectedChecksum) {
2 changes: 2 additions & 0 deletions src/cleanup.ts
Original file line number Diff line number Diff line change
@@ -5,6 +5,8 @@ import isDocker from "is-docker";
import { arcCleanUp, isArcRunner, removeStepPolicyFiles } from "./arc-runner";

(async () => {
console.log("[harden-runner] post-step");

if (process.platform !== "linux") {
console.log(common.UBUNTU_MESSAGE);
return;
13 changes: 10 additions & 3 deletions src/common.ts
Original file line number Diff line number Diff line change
@@ -35,8 +35,15 @@ export const processLogLine = (
if (matches) {
const [ipAddress, domain, pid, process] = matches.slice(1);

// Check if all values are non-empty
if (pid && process && domain && ipAddress) {
// Check if all values are non-empty and domain does not end with specified patterns
if (
pid &&
process &&
domain &&
ipAddress &&
!domain.endsWith(".actions.githubusercontent.com.") &&
!domain.endsWith(".blob.core.windows.net.")
) {
const status = ipAddress.startsWith("54.185.253.63")
? "❌ Blocked"
: "✅ Allowed";
@@ -173,4 +180,4 @@ export const HARDEN_RUNNER_UNAVAILABLE_MESSAGE =
"Sorry, we are currently experiencing issues with the Harden Runner installation process. It is currently unavailable.";

export const ARC_RUNNER_MESSAGE =
"Workflow is currently being executed in ARC based runner";
"Workflow is currently being executed in ARC based runner";
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -4,6 +4,8 @@ import isDocker from "is-docker";
import { STEPSECURITY_WEB_URL } from "./configs";

(async () => {
console.log("[harden-runner] main-step");

if (process.platform !== "linux") {
console.log(common.UBUNTU_MESSAGE);
return;
4 changes: 3 additions & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
@@ -34,6 +34,8 @@ interface MonitorResponse {

(async () => {
try {
console.log("[harden-runner] pre-step");

if (process.platform !== "linux") {
console.log(common.UBUNTU_MESSAGE);
return;
@@ -234,7 +236,7 @@ interface MonitorResponse {

if (await isTLSEnabled(context.repo.owner)) {
downloadPath = await tc.downloadTool(
"https://packages.stepsecurity.io/github-hosted/harden-runner_1.2.2_linux_amd64.tar.gz"
"https://packages.stepsecurity.io/github-hosted/harden-runner_1.2.3_linux_amd64.tar.gz"
);
verifyChecksum(downloadPath, true); // NOTE: verifying tls_agent's checksum, before extracting
} else {