Skip to content

Support for specifying harden-runner egress policy #754

Support for specifying harden-runner egress policy

Support for specifying harden-runner egress policy #754

# Copyright 2020 Wayback Archiver. All rights reserved.
# Use of this source code is governed by the MIT license
# that can be found in the LICENSE file.
name: Linter
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
types: [ opened, synchronize, reopened ]
workflow_call:
inputs:
slim:
type: boolean
default: true
description: 'Whether or not to use Super-Linter Slim image action.'
egress-policy:
type: string
default: 'block'
description: 'Harden-Runner egress traffic policy'
permissions:
contents: read
jobs:
super-linter:
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@1f99358870fe1c846a3ccba386cc2b2246836776 # v2.2.1
with:
disable-sudo: true
egress-policy: ${{ inputs.egress-policy || 'block' }}
disable-telemetry: true
allowed-endpoints: >
github.com:443
api.github.com:443
actions-results-receiver-production.githubapp.com:443
- name: Check out code base
if: github.event_name == 'push'
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
fetch-depth: 0
persist-credentials: false
- name: Check out code base
if: github.event_name == 'pull_request'
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
with:
fetch-depth: 0
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
- name: Lint Code Base
uses: github/super-linter/slim@bb2d833b08b6c288608686672b93a8a4589cdc49 # v4.9.7
if: ${{ inputs.slim }}
env:
DEFAULT_BRANCH: 'main'
VALIDATE_MARKDOWN: true
VALIDATE_DOCKERFILE: true
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Lint Code Base
uses: github/super-linter/slim@bb2d833b08b6c288608686672b93a8a4589cdc49 # v4.9.7
if: ${{ inputs.slim == false }}
env:
DEFAULT_BRANCH: 'main'
VALIDATE_MARKDOWN: true
VALIDATE_DOCKERFILE: true
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}