GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — commitwork/.github/workflows/github-action.yml at main · Portll/commitwork 125 lines (119 loc) · 5.73 KB / Copy pathgithub-action.ymlFile metadata and controls125 lines (119 loc) · 5.73 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 name: GitHub Action # Runs action.yml from this checkout (`uses: ./`) over the dirty scan canary, on a hosted runner. # bin/test/github-action.test.mjs runs the same steps under bash on every suite run; this is the # run on GitHub's own runner, which that test cannot be. # # Two jobs. `bare` installs nothing, so the scanner lanes cannot measure and the SARIF must name # each of them. `with-tools` installs the fast group's scanners, so those lanes must measure and # the dirty canary must produce results. Upload is off in both: the canary's findings are not this # repository's. # # The path lists name what decides whether a lane measures: the runner, the sandbox and the lane # manifest. The weekly run is for what no commit changes: ubuntu-latest became 26.04 on 2026-11-18 # and `with-tools` failed there for ten days before a pull request touched one of these paths. on: schedule: - cron: '41 4 * * 1' push: paths: - action.yml - bin/commitwork.mjs - bin/lib/github-action.mjs - bin/lib/sarif-export.mjs - bin/lib/sandbox.mjs - bin/lib/sandbox-net.mjs - bin/lib/scanner-env.mjs - manifests/security-baseline.json - .github/workflows/github-action.yml pull_request: paths: - action.yml - bin/commitwork.mjs - bin/lib/github-action.mjs - bin/lib/sarif-export.mjs - bin/lib/sandbox.mjs - bin/lib/sandbox-net.mjs - bin/lib/scanner-env.mjs - manifests/security-baseline.json - .github/workflows/github-action.yml workflow_dispatch: concurrency: group: github-action-${{ github.event_name }}-${{ github.ref }} cancel-in-progress: true permissions: contents: read jobs: bare: name: The action with no scanner installed runs-on: ubuntu-latest timeout-minutes: 15 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - id: cw uses: ./ # zizmor: ignore[self-repository] ./ is the documented local-action form; $/ is unverified on hosted runners here with: path: fixtures/scan-canary/dirty upload-sarif: 'false' fail-on: none - name: The SARIF was written and names every lane that did not measure env: SARIF: ${{ steps.cw.outputs.sarif }} REPORT_DIR: ${{ steps.cw.outputs.report-dir }} FAILED: ${{ steps.cw.outputs.failed }} UNMEASURED: ${{ steps.cw.outputs.unmeasured }} run: | test -s "$SARIF" test "$FAILED" = false # shellcheck disable=SC2016 # the ${} are JavaScript template literals node -e ' const fs = require("fs"); const run = JSON.parse(fs.readFileSync(process.env.SARIF, "utf8")).runs[0]; const warned = new Set(run.invocations[0].toolExecutionNotifications.filter((n) => n.level === "warning").map((n) => n.descriptor.id)); const status = JSON.parse(fs.readFileSync(`${process.env.REPORT_DIR}/checks-status.json`, "utf8")); const voided = status.filter((s) => s.status === "noscan").map((s) => s.check); const missing = voided.filter((id) => !warned.has(id)); if (!voided.length) { console.error("no lane was voided on a bare runner; the scanners are installed after all"); process.exit(1); } if (missing.length) { console.error(`did not measure and not named in the SARIF: ${missing.join(", ")}`); process.exit(1); } if (String(warned.size) !== process.env.UNMEASURED) { console.error(`unmeasured output ${process.env.UNMEASURED}, SARIF ${warned.size}`); process.exit(1); } console.log(`${run.results.length} result(s); not measured: ${[...warned].join(", ")}`); ' with-tools: name: The action with the fast group's scanners installed runs-on: ubuntu-latest timeout-minutes: 20 steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - id: cw uses: ./ # zizmor: ignore[self-repository] ./ is the documented local-action form; $/ is unverified on hosted runners here with: path: fixtures/scan-canary/dirty upload-sarif: 'false' fail-on: none install-tools: 'true' - name: The scanner lanes measured and the canary produced results env: SARIF: ${{ steps.cw.outputs.sarif }} RESULTS: ${{ steps.cw.outputs.results }} REPORT_DIR: ${{ steps.cw.outputs.report-dir }} run: | test -s "$SARIF" test "$RESULTS" -gt 0 # shellcheck disable=SC2016 # the ${} are JavaScript template literals node -e ' const fs = require("fs"); const run = JSON.parse(fs.readFileSync(process.env.SARIF, "utf8")).runs[0]; const warned = run.invocations[0].toolExecutionNotifications.filter((n) => n.level === "warning").map((n) => n.descriptor.id); const logs = { "secrets-gitleaks": "gitleaks.log", sast: "semgrep.log", "actions-zizmor": "zizmor.log" }; const blind = Object.keys(logs).filter((id) => warned.includes(id)); for (const id of blind) { const path = `${process.env.REPORT_DIR}/${logs[id]}`; const tail = fs.existsSync(path) ? fs.readFileSync(path, "utf8").trimEnd().split("\n").slice(-80).join("\n") : ""; console.error(`::group::${id}: ${logs[id]}\n${tail || "(the scanner wrote nothing to its log)"}\n::endgroup::`); } if (blind.length) { console.error(`installed and still not measured: ${blind.join(", ")}`); process.exit(1); } console.log(`${run.results.length} result(s); not measured: ${warned.join(", ") || "none"}`); ' |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |