Skip to content

Retry: Potential fix for code scanning alert no. 5: Workflow does not contain permissions - #489

Closed
dannystaple wants to merge 3 commits into
masterfrom
revert-488-revert-487-alert-autofix-5
Closed

dannystaple wants to merge 3 commits into
masterfrom
revert-488-revert-487-alert-autofix-5

Conversation

@dannystaple

Copy link
Copy Markdown
Member

Reverts #488

Need to fix:

[Invalid workflow file: .github/workflows/on_push_to_master_test_and_deploy.yaml#L43](https://github.com/orionrobots/orionrobots.github.io/actions/runs/33924560208/workflow)
The workflow is not valid. .github/workflows/on_push_to_master_test_and_deploy.yaml (Line: 43, Col: 3): Error calling workflow 'orionrobots/orionrobots.github.io/.github/workflows/on_call_build_site.yaml@893fbb695f199033a88ae59e080970057a80c8ba'. The nested job 'build_site' is requesting 'packages: write', but is only allowed 'packages: none'.

@dannystaple dannystaple changed the title Revert "Revert "Potential fix for code scanning alert no. 5: Workflow does not contain permissions"" Retry: Potential fix for code scanning alert no. 5: Workflow does not contain permissions Sep 5, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ ACTION actionlint 7 0 0 0.14s
⚠️ ACTION zizmor 7 1 0 0.43s
✅ BASH bash-exec 2 0 0 0.01s
✅ BASH shellcheck 2 0 0 0.13s
⚠️ BASH shfmt 2 1 0 0.01s
⚠️ C cppcheck 8 8 0 0.06s
⚠️ CPP cppcheck 8 8 0 0.05s
✅ JSON npm-package-json-lint yes no no 0.52s
✅ JSON v8r 17 0 0 9.32s
✅ REPOSITORY betterleaks yes no no 1.28s
✅ REPOSITORY git_diff yes no no 0.71s
✅ REPOSITORY grype yes no no 58.35s
✅ REPOSITORY osv-scanner yes no no 1.49s
✅ REPOSITORY secretlint yes no no 70.63s
✅ REPOSITORY syft yes no no 2.22s
✅ REPOSITORY trivy-sbom yes no no 1.87s
✅ REPOSITORY trufflehog yes no no 5.51s
✅ TYPESCRIPT ts-standard 3 0 0 4.65s
✅ XML xmllint 1 0 0 9.77s
✅ YAML v8r 15 0 0 11.64s

Detailed Issues

⚠️ C / cppcheck - 8 errors
Checking assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h ...
assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
class SR04 {
^
1/8 files checked 12% done
Checking assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h ...
assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
class Motor {
^
2/8 files checked 19% done
Checking assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h ...
assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
class SR04 {
^
3/8 files checked 31% done
Checking assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h ...
assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
class Motor {
^
4/8 files checked 49% done
Checking galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h ...
galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
class SR04 {
^
5/8 files checked 62% done
Checking galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h ...
galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
class Motor {
^
6/8 files checked 69% done
Checking galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h ...
galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
class SR04 {
^
7/8 files checked 81% done
Checking galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h ...
galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
class Motor {
^
8/8 files checked 100% done
⚠️ CPP / cppcheck - 8 errors
Checking assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h ...
assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
class SR04 {
^
1/8 files checked 12% done
Checking assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h ...
assets/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
class Motor {
^
2/8 files checked 19% done
Checking assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h ...
assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
class SR04 {
^
3/8 files checked 31% done
Checking assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h ...
assets/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
class Motor {
^
4/8 files checked 49% done
Checking galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h ...
galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
class SR04 {
^
5/8 files checked 62% done
Checking galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h ...
galleries/2013-11-14-explorer-wall-avoider-kit/alternative_demo/Motors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
class Motor {
^
6/8 files checked 69% done
Checking galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h ...
galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/DistanceSensor.h:3:1: error: Code 'classSR04{' is invalid C code. [syntaxError]
class SR04 {
^
7/8 files checked 81% done
Checking galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h ...
galleries/2013-11-14-explorer-wall-avoider-kit/demo_sketch/TurtleMotors.h:3:1: error: Code 'classMotor{' is invalid C code. [syntaxError]
class Motor {
^
8/8 files checked 100% done
⚠️ BASH / shfmt - 1 error
diff .github/scripts/validate-local-build.sh.orig .github/scripts/validate-local-build.sh
--- .github/scripts/validate-local-build.sh.orig
+++ .github/scripts/validate-local-build.sh
@@ -30,9 +30,9 @@
 echo ""
 echo "=== Step 1: Checking http_serve is running ==="
 if ! docker ps --format '{{.Names}}' | grep -q "^${HTTP_SERVE_CONTAINER}$"; then
-  echo "ERROR: ${HTTP_SERVE_CONTAINER} is not running."
-  echo "Start it with: docker compose --profile manual up -d http_serve"
-  exit 1
+    echo "ERROR: ${HTTP_SERVE_CONTAINER} is not running."
+    echo "Start it with: docker compose --profile manual up -d http_serve"
+    exit 1
 fi
 
 # ─── Step 2: Quick HTTP smoke check from host ─────────────────────────────────
@@ -39,17 +39,17 @@
 echo ""
 echo "=== Step 2: HTTP smoke checks (host -> port ${HOST_PORT}) ==="
 for path in "/" "/construction_guide.html" "/tags/arduino/"; do
-  status=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:${HOST_PORT}${path}")
-  if [[ "$status" == "200" ]]; then
-    echo "  OK  ${path} -> ${status}"
-  else
-    echo "  FAIL ${path} -> ${status}"
-    SMOKE_FAILED=1
-  fi
+    status=$(curl -s -o /dev/null -w "%{http_code}" "http://localhost:${HOST_PORT}${path}")
+    if [[ "$status" == "200" ]]; then
+        echo "  OK  ${path} -> ${status}"
+    else
+        echo "  FAIL ${path} -> ${status}"
+        SMOKE_FAILED=1
+    fi
 done
 if [[ -n "${SMOKE_FAILED:-}" ]]; then
-  echo "ERROR: Smoke checks failed."
-  exit 1
+    echo "ERROR: Smoke checks failed."
+    exit 1
 fi
 
 # ─── Step 3: Verify AVIF images are generated ────────────────────────────────
@@ -62,8 +62,8 @@
 echo "  Post body WebP: ${webp_count}"
 echo "  Thumbnail AVIF: ${thumb_avif}"
 if [[ "$avif_count" -eq 0 ]]; then
-  echo "ERROR: No AVIF images found in _site/assets/images. Was the build run?"
-  exit 1
+    echo "ERROR: No AVIF images found in _site/assets/images. Was the build run?"
+    exit 1
 fi
 
 # ─── Step 4: BDD tests ─────────────────────────────────────────────────────
@@ -71,14 +71,14 @@
 echo "=== Step 4: BDD tests (via Docker, network: ${DOCKER_NETWORK}) ==="
 
 docker run --rm \
-  --network "${DOCKER_NETWORK}" \
-  -e BASE_URL="${BASE_URL}" \
-  -v "${PROJECT_ROOT}/tests:/app/src/tests" \
-  -v "${PROJECT_ROOT}/package.json:/app/src/package.json" \
-  -v "${PROJECT_ROOT}/package-lock.json:/app/src/package-lock.json" \
-  -v "${PROJECT_ROOT}/cucumber.js:/app/src/cucumber.js" \
-  "${TEST_IMAGE}" \
-  npm run test:bdd
+    --network "${DOCKER_NETWORK}" \
+    -e BASE_URL="${BASE_URL}" \
+    -v "${PROJECT_ROOT}/tests:/app/src/tests" \
+    -v "${PROJECT_ROOT}/package.json:/app/src/package.json" \
+    -v "${PROJECT_ROOT}/package-lock.json:/app/src/package-lock.json" \
+    -v "${PROJECT_ROOT}/cucumber.js:/app/src/cucumber.js" \
+    "${TEST_IMAGE}" \
+    npm run test:bdd
 
 echo ""
 echo "=== Validation complete ==="
⚠️ ACTION / zizmor - 1 error
INFO zizmor: 🌈 zizmor v1.25.0
fatal: no audit was performed
'artipacked' audit failed on file://.github/workflows/on_call_build_site.yaml

Caused by:
    0: error in 'artipacked' audit
    1: couldn't list tags for actions/checkout
    2: request error while accessing GitHub API
    3: HTTP status client error (401 Unauthorized) for url (https://github.com/actions/checkout.git/git-upload-pack)

Notices

⚠️ Your configuration references items that have been removed from MegaLinter and are ignored: REPOSITORY_KICS. See Removed linters to find their replacements.

See detailed reports in MegaLinter artifacts

You could have the same capabilities but better runtime performances if you use a MegaLinter flavor:

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.0.0 --custom-flavor-setup --custom-flavor-linters ACTION_ACTIONLINT,ACTION_ZIZMOR,BASH_EXEC,BASH_SHELLCHECK,BASH_SHFMT,C_CPPCHECK,CPP_CPPCHECK,JSON_V8R,JSON_NPM_PACKAGE_JSON_LINT,REPOSITORY_GIT_DIFF,REPOSITORY_BETTERLEAKS,REPOSITORY_GRYPE,REPOSITORY_OSV_SCANNER,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,TYPESCRIPT_STANDARD,XML_XMLLINT,YAML_V8R

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

@dannystaple

Copy link
Copy Markdown
Member Author

Fixed elsewhere.

@dannystaple
dannystaple deleted the revert-488-revert-487-alert-autofix-5 branch September 19, 2026 13:50
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