Skip to content

Self-Hosted (VM): Network Filtering with Harden-Runner #4

Self-Hosted (VM): Network Filtering with Harden-Runner

Self-Hosted (VM): Network Filtering with Harden-Runner #4

name: "Self-Hosted (VM): Network Filtering with Harden-Runner"
on:
workflow_dispatch:
jobs:
build:
runs-on: [self-hosted, ec2]
steps:
- name: Harden Runner
uses: step-security/harden-runner@self-hosted
with:
egress-policy: block
allowed-endpoints: >
*.docker.io:443
ghcr.io:443
github.com:443
registry.npmjs.org:443
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: npm install
run: |
cd ./src/exfiltration-demo
npm install
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@v5
with:
name: ${{ github.repository }}/prod:latest
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: ghcr.io
workdir: ./src/exfiltration-demo