Skip to content
Merged
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
17 changes: 10 additions & 7 deletions .github/workflows/psa-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,25 @@ jobs:
- name: download artifacts
uses: actions/download-artifact@v6
with:
pattern: "k8s-manifests-*"
pattern: k8s-manifests-*
merge-multiple: true
path: "shared"
- name: run psa-checker
id: psa_check
shell: bash # sets the flags --noprofile --norc -eo pipefail
env:
PSS_LEVEL: ${{ inputs.pss_level }}
CHART_DIR: ${{ matrix.chart }}
CHART: ${{ matrix.chart }}
run: |
# Loop over templates from each environment dir and check PSS levels
# Check pod security levels for templates in each chart
docker pull $PSA_CHECKER_IMAGE:$PSA_CHECKER_SHA # Pull before run so the output is less messy
cd "shared/charts/$CHART_DIR/"
for ENV_DIR in */; do
find $ENV_DIR -type f -exec cat {} + \
echo "Checking PSS level for ${CHART}..."
if [ -d "shared/charts/${CHART}" ]; then
find "shared/charts/${CHART}" -type f -exec cat {} + \
| docker run -i --rm $PSA_CHECKER_IMAGE:$PSA_CHECKER_SHA --level "$PSS_LEVEL" -f - \
| grep -v "Non standard" \
| grep -v "Kind not"
done
else
# Fail only if PSS violations are found - if chart failed to render just print a warning
echo "Warning: Rendered output for ${CHART} not found."
fi
Loading