Skip to content

Update github/codeql-action action to v4.35.5 #1232

Update github/codeql-action action to v4.35.5

Update github/codeql-action action to v4.35.5 #1232

Workflow file for this run

name: Lint policies with OPA/Regal
on: [push, pull_request]
# Declare default permissions as read only.
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-policy:
runs-on: ubuntu-latest
env:
# renovate: datasource=github-releases depName=open-policy-agent/opa
OPA_VERSION: v1.15.2
# renovate: datasource=github-releases depName=StyraInc/regal
REGAL_VERSION: v0.39.0
# renovate: datasource=pypi depName=yq
YQ_VERSION: 3.4.3
steps:
- name: Harden Runner
uses: step-security/harden-runner@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
with:
egress-policy: audit
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
- name: Setup yq (pypi.org/project/yq/)
run: |
pip3 install yq==${YQ_VERSION}
- name: Setup OPA
uses: open-policy-agent/setup-opa@950f159a49aa91f9323f36f1de81c7f6b5de9576 # v2.3.0
with:
version: ${{ env.OPA_VERSION }}
- name: Setup Regal
uses: StyraInc/setup-regal@33a142b1189004e0f14bf42b15972c67eecce776 # v1.0.0
with:
version: ${{ env.REGAL_VERSION }}
- name: Setup Bats
uses: bats-core/bats-action@77d6fb60505b4d0d1d73e48bd035b55074bbfb43 # 4.0.0
- name: Setup Conftest
uses: princespaghetti/setup-conftest@417586a9b2e806fc5a95c72dfe98e296ef092b6f # v1.2.0
- name: Setup oc
uses: redhat-actions/openshift-tools-installer@144527c7d98999f2652264c048c7a9bd103f8a82 # v1
with:
oc: "4"
- name: Run OPA Check
run: opa check policy --strict --v0-compatible
- name: Run Regal lint
run: regal lint --format github policy
- name: Run OPA eval --profile
run: _test/opa-profile.sh
- name: Upload opa-profile.log
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: profile-results
path: opa-profile.log