Skip to content

Conversation

PopoviciMarian
Copy link
Contributor

No description provided.

Comment on lines +452 to +485
test_php_qa_action:
runs-on: ubuntu-latest
needs: [ build_deb ]
steps:

- name: Checkout zen-demo-php
uses: actions/checkout@v4
with:
repository: Aikido-demo-apps/zen-demo-php
path: zen-demo-php
ref: dev-testing
submodules: recursive

- name: Get Arch
run: echo "ARCH=$(uname -m)" >> $GITHUB_ENV

- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: aikido-php-firewall.${{ env.ARCH }}.deb
path: ./zen-demo-php

- name: Overwrite aikido.sh install script
run: |
echo "dpkg -i -E \"/var/www/html/aikido-php-firewall.\$(uname -i).deb\"" > ./zen-demo-php/.fly/scripts/aikido.sh
- name: Run Firewall QA Tests
uses: AikidoSec/firewall-tester-action@releases/v1
with:
dockerfile_path: ./zen-demo-php/Dockerfile
extra_args: '--env-file=./zen-demo-php/.env.example -e APP_KEY=base64:W2v6u6VR4lURkxuMT9xZ6pdhXSt5rxsmWTbd1HGqlIM='
sleep_before_test: 20
skip_tests: test_wave_attack,test_rate_limiting_group_id_1_minute
max_parallel_tests: 7

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}

Copilot Autofix

AI 10 days ago

The correct way to fix this issue is to add an explicit permissions block specifying the minimal set of permissions required. In this case, since none of the jobs require write access to repository contents or metadata, the safest starting point is permissions: contents: read, applied at the root level—this ensures all jobs default to least privilege. If individual jobs require more privileges, a granular permissions block can be added to those jobs only. To implement the fix, insert permissions: contents: read beneath the workflow name (line 1) and above on: (line 3) in .github/workflows/build.yml.

No new imports or packages are required; this fix is declarative in the workflow YAML.

Suggested changeset 1
.github/workflows/build.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,4 +1,6 @@
 name: Build
+permissions:
+  contents: read
 
 on:
   push:
EOF
@@ -1,4 +1,6 @@
name: Build
permissions:
contents: read

on:
push:
Copilot is powered by AI and may make mistakes. Always verify output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant