Skip to content

auth test: PR results #20

auth test: PR results

auth test: PR results #20

Workflow file for this run

name: Run Auth Tests
on:
workflow_dispatch:
jobs:
publish:

Check failure on line 6 in .github/workflows/auth-tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/auth-tests.yml

Invalid workflow file

You have an error in your yaml syntax on line 6
name: Authentication Tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Pull nightly image
run: docker pull ghcr.io/zaproxy/zaproxy:nightly
- name: Authentication plan tests
id: "test-auth-plans"
if: ${{ ! cancelled() }}
env:
AUTH_SCANS_CREDS: ${{ secrets.AUTH_SCANS_CREDS }}
run: |
echo "$AUTH_SCANS_CREDS" | tee -a scans/auth/all_vars.env > /dev/null
chmod -R a+w $(pwd)
docker run --rm -v $(pwd):/zap/wrk/:rw --env-file scans/auth/all_vars.env -t zaproxy/zap-nightly /zap/wrk/scans/auth/auth_plan_tests.sh
echo "\`\`\`yaml" >> $GITHUB_STEP_SUMMARY
cat output/output.yml >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: Attach result
uses: actions/upload-artifact@v4
with:
path: output/output.yml
- name: Build Feature Branch and Raise PR
run: |
# Setup git details
export GITHUB_USER=zapbot
git config --global user.email "12745184+zapbot@users.noreply.github.com"
git config --global user.name $GITHUB_USER
# Clone destination repo
git clone -o upstream https://github.com/zaproxy/zaproxy-website.git
cd zaproxy-website
git remote add origin https://github.com/$GITHUB_USER/zaproxy-website.git
# Setup env vars for later
BRANCH="auth-tests-update"
SHORT_DATE="$(date +"%Y-%m-%d")"
export GITHUB_TOKEN=${{ secrets.ZAPBOT_TOKEN }}
# Build the feature branch
git checkout -b $BRANCH
cp -f ../output/output.yml site/data/scans/auth/output.yml
## Update the index to be sure git is aware of changes
git update-index -q --refresh
## If there are changes: comment, commit, PR
if ! git diff-index --quiet HEAD --; then
git remote set-url origin https://$GITHUB_USER:$GITHUB_TOKEN@github.com/$GITHUB_USER/zaproxy-website.git
git add .
git commit -m "Authentication Tests Update $SHORT_DATE" --signoff
git push --set-upstream origin $BRANCH --force
# Open the PR
gh pr create -f
fi