Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ updates:
directory: '/site'
schedule:
interval: 'weekly'
cooldown:
default-days: 7
open-pull-requests-limit: 10
labels:
- 'dependencies'
Expand All @@ -25,6 +27,8 @@ updates:
directory: '/'
schedule:
interval: 'weekly'
cooldown:
default-days: 7
open-pull-requests-limit: 5
labels:
- 'dependencies'
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/a11y.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
run:
working-directory: ./site
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Disable persisted checkout credentials in both browser jobs. zizmor reports the omitted opt-out, and these jobs execute package/browser tooling after checkout. Add persist-credentials: false to both checkout steps. (github.com)

  • .github/workflows/a11y.yml#L22-L22: add with.persist-credentials: false.
  • .github/workflows/lighthouse.yml#L22-L22: add with.persist-credentials: false.
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 22-22: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 2 files
  • .github/workflows/a11y.yml#L22-L22 (this comment)
  • .github/workflows/lighthouse.yml#L22-L22
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/a11y.yml at line 22, Update the checkout steps in
.github/workflows/a11y.yml at lines 22-22 and .github/workflows/lighthouse.yml
at lines 22-22 by adding with.persist-credentials: false to both
actions/checkout uses entries.

Source: Linters/SAST tools


- uses: actions/setup-node@v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 22
cache: npm
Expand All @@ -31,6 +31,10 @@ jobs:

- run: npm run build

- name: Install matching Chrome + ChromeDriver
run: npx --yes browser-driver-manager install chrome
Comment on lines +34 to +35

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
fd -t f -g 'package.json' -g 'package-lock.json' . \
  -x rg -n 'browser-driver-manager' {} || true

Repository: LUSKTECH/gl1tch.xyz

Length of output: 221


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Package files:"
git ls-files | rg '(^|/)package\.json$|(^|/)package-lock\.json$|(^|/)pnpm-lock\.yaml$|(^|/)yarn\.lock$|(^|/)npm-shrinkwrap\.json$' || true

echo
echo "browser-driver-manager references:"
rg -n 'browser-driver-manager|npx --yes|npm exec|browser-driver' .github package.json package-lock.json pnpm-lock.yaml yarn.lock npm-shrinkwrap.json 2>/dev/null || true

echo
echo "Workflow files:"
fd -t f .github/workflows -x sh -c 'echo "--- $1"; sed -n "1,100p" "$1"' sh {}

Repository: LUSKTECH/gl1tch.xyz

Length of output: 1122


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Package files:"
git ls-files | rg '(^|/)package\.json$|(^|/)package-lock\.json$|(^|/)pnpm-lock\.yaml$|(^|/)yarn\.lock$|(^|/)npm-shrinkwrap\.json$' || true

echo
echo "browser-driver-manager references:"
rg -n 'browser-driver-manager|npx --yes|npm exec|browser-driver' .github package.json package-lock.lock pnpm-lock.yaml yarn.lock npm-shrinkwrap.json 2>/dev/null || true

echo
echo "Workflow files:"
fd -t f .github/workflows -x sh -c 'echo "--- $1"; sed -n "1,100p" "$1"' sh {}

Repository: LUSKTECH/gl1tch.xyz

Length of output: 1122


🌐 Web query:

npm exec npx --yes remote package fetch behavior no local package

💡 Result:

When using npm exec or npx to run a package that is not installed locally, the following behavior occurs: 1. Identification: If the requested package is not present in the local project's dependencies, npm identifies that it needs to be fetched [1][2]. 2. Prompting: By default, npm will print a prompt to the terminal asking for confirmation to install the missing package [1][3]. 3. Suppression: If the --yes (or -y) flag is provided, this prompt is suppressed, and npm proceeds with the installation automatically [1][2]. This is also the default behavior if the command is run in a non-interactive (CI) environment where standard input is not a TTY [1][3]. 4. Fetching and Installation: The requested package is downloaded and installed into a temporary folder within the npm cache [1][2]. 5. Execution: The directory containing this newly installed package is added to the PATH environment variable for the duration of the executed process, allowing the command to run as if it were a local dependency [1][2]. After the command completes, the package remains in the npm cache but is not added to your project's local node_modules or dependencies [1][2]. [4][1][2]

Citations:


🌐 Web query:

site/package.json browser-driver-manager

💡 Result:

The browser-driver-manager is a command-line interface (CLI) tool designed to manage Chrome and Firefox browsers and their corresponding drivers [1][2][3]. It is particularly useful in continuous integration (CI) environments to ensure that the browser and its driver remain synchronized [4][3]. Key details about the package: - Purpose: It automates the installation and management of browser binaries and drivers. Version 2.0.0 and later transitioned to using Chrome for Testing, which resolves previous issues where driver packages occasionally lagged behind browser updates [5]. - Usage: The tool is typically installed via npm (npm install browser-driver-manager) and used to install specific browser channels (e.g., Stable, Beta) and matching drivers [4][3]. - Storage: Once installed, it creates a directory in the user's home folder (~/.browser-driver-manager) where it caches browser and driver files [4][5]. It also generates a.env file within that directory that exports paths (e.g., CHROME_TEST_PATH and CHROMEDRIVER_TEST_PATH) for use in testing configurations [4][5]. It is important to distinguish this Node.js package from WebDriverManager, which is a popular Java library for automated driver management in Selenium [6][7], and Selenium Manager, the built-in tool included with Selenium that provides similar automated management capabilities [8]. For more information, you can view the official package details and source code on its npm page or GitHub repository [1][4][3].

Citations:


Pin browser-driver-manager version before running it with npx --yes. Neither workflow uses the lockfile-backed package, so npx --yes resolves/fetches it from npm at runtime unless an exact version is specified. Apply the same change to .github/workflows/a11y.yml and .github/workflows/lighthouse.yml.

📍 Affects 2 files
  • .github/workflows/a11y.yml#L34-L35 (this comment)
  • .github/workflows/lighthouse.yml#L34-L35
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/a11y.yml around lines 34 - 35, Pin an exact
browser-driver-manager version in the Install matching Chrome + ChromeDriver
step’s npx invocation in .github/workflows/a11y.yml lines 34-35 and apply the
same version pin to .github/workflows/lighthouse.yml lines 34-35, preserving the
existing installation command behavior.

working-directory: .
Comment on lines +34 to +36

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
rg -n 'browser-driver-manager|CHROME_PATH|chromePath|CHROMEDRIVER_PATH|chromedriver-path|chrome-path' \
  .github/workflows/a11y.yml .github/workflows/lighthouse.yml \
  site/lighthouserc.cjs site/package.json site/package-lock.json

Repository: LUSKTECH/gl1tch.xyz

Length of output: 345


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '--- workflows relevant sections ---\n'
for f in .github/workflows/a11y.yml .github/workflows/lighthouse.yml; do
  echo "### $f"
  nl -ba "$f" | sed -n '1,180p'
done

printf '\n--- package manifests mentioning scanners/browser-driver-manager ---\n'
for f in package.json site/package.json; do
  if [ -f "$f" ]; then
    echo "### $f"
    python3 - <<'PY' "$f"
import json, sys
p=sys.argv[1]
with open(p) as fh: data=json.load(fh)
for sec in ('dependencies','devDependencies'):
 vals=data.get(sec,{})
 matches={k:v for k,v in vals.items() if 'axe' in k.lower() or 'lighthouse' in k.lower() or 'browser-driver-manager' in k.lower()}
 if matches:
    print(sec, matches)
PY
  fi
done

printf '\n--- find relevant config/package files ---\n'
fd -a 'lighthouserc|package(-lock)?\.json|axe|jest|vitest|playwright|puppeteer' site .github 2>/dev/null | sed 's#^\./##' | sort

Repository: LUSKTECH/gl1tch.xyz

Length of output: 248


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' '--- workflows relevant sections ---'
for f in .github/workflows/a11y.yml .github/workflows/lighthouse.yml; do
  echo "### ${f}"
  nl -ba "$f" | sed -n '1,200p'
done

printf '%s\n' ''
printf '%s\n' '--- package manifests mentioning scanners/browser-driver-manager ---'
for f in package.json site/package.json; do
  if [ -f "$f" ]; then
    echo "### ${f}"
    python3 - "$f" <<'PY'
import json, sys
p=sys.argv[1]
with open(p) as fh: data=json.load(fh)
for sec in ('dependencies','devDependencies','scripts'):
    vals=data.get(sec)
    if sec in ('dependencies','devDependencies') and vals:
        matches={k:v for k,v in vals.items() if 'axe' in k.lower() or 'lighthouse' in k.lower() or 'browser-driver-manager' in k.lower()}
        if matches:
            print(sec, matches)
    elif sec == 'scripts' and vals:
        matches={k:v for k,v in vals.items() if 'axe' in k.lower() or 'lighthouse' in k.lower() or 'browser-driver-manager' in k.lower()}
        if matches:
            print(sec, matches)
PY
  fi
done

printf '%s\n' ''
printf '%s\n' '--- find relevant config/package files ---'
fd -a 'lighthouserc|package(-lock)?\.json|axe|jest|vitest|playwright|puppeteer' site .github 2>/dev/null | sed 's#^\./##' | sort || true

Repository: LUSKTECH/gl1tch.xyz

Length of output: 264


🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail

cat -n .github/workflows/a11y.yml
printf '%s\n' '--- end a11y.yml ---'
cat -n .github/workflows/lighthouse.yml
printf '%s\n' '--- end lighthouse.yml ---'

printf '%s\n' '--- package files ---'
if [ -f site/package.json ]; then cat -n site/package.json; fi
if [ -f site/lighthouserc.cjs ]; then cat -n site/lighthouserc.cjs; fi

printf '%s\n' '--- package search ---'
python3 - <<'PY' "$@"
import glob, json, re, os
paths=[]
for base in ('.', 'site'):
    if os.path.exists(base):
        for root, dirs, files in os.walk(base):
            dirs[:] = [d for d in dirs if d not in {'.git', 'node_modules'}]
            for f in files:
                if f in {'package.json','package-lock.json'}:
                    paths.append(os.path.join(root, f))
for p in sorted(paths):
    try:
        with open(p, encoding='utf-8') as fh: data=json.load(fh)
    except Exception as e:
        print(f"ERR {p}: {e}")
        continue
    keys=[]
    if 'dependencies' in data: keys+=[k for k,v in data['dependencies'].items() if any(x in k.lower() for x in ['axe','lighthouse','browser-driver-manager','playwright','puppeteer'])]
    if 'devDependencies' in data: keys+=[k for k,v in data['devDependencies'].items() if any(x in k.lower() for x in ['axe','lighthouse','browser-driver-manager','playwright','puppeteer'])]
    if 'scripts' in data: keys+=[k for k,v in data['scripts'].items() if any(x in k.lower() for x in ['axe','lighthouse','browser-driver-manager','playwright','puppeteer'])]
    if keys:
        print("FILE", p)
        for k in sorted(keys):
            print(k, getattr(data, {**{'dependencies': data.get('dependencies')}, **{'devDependencies': data.get('devDependencies')}, **{'scripts': data.get('scripts')}}.get(k)), type(data))
PY

Repository: LUSKTECH/gl1tch.xyz

Length of output: 5340


🌐 Web query:

browser-driver-manager npm .env CHROME_PATH CHROMEDRIVER_PATH environment variables

💡 Result:

The browser-driver-manager npm package automatically creates a directory in your home folder named.browser-driver-manager upon installation [1][2]. Inside this directory, it maintains a.env file that stores the absolute paths to the installed Chrome and Chromedriver binaries under the environment variable keys CHROME_TEST_PATH and CHROMEDRIVER_TEST_PATH, respectively [1][2]. To utilize these paths in your application, you must load this.env file [1][3]. A common approach in Node.js, using the dotenv package, is as follows [1][2]: require('dotenv').config({ path: '~/.browser-driver-manager/.env' }); console.log(process.env.CHROME_TEST_PATH); console.log(process.env.CHROMEDRIVER_TEST_PATH); Since these paths are generated dynamically by the browser-driver-manager, they are intended to be read from this file rather than hardcoded [4][1]. This method is especially important for version 2.0.0 and later, as it replaces the previous practice of relying on the chromedriver npm package's path property [4][2]. For non-Node.js environments, you can similarly parse this.env file using standard file I/O or environment variable loaders available in your language of choice [5][6][7].

Citations:


🌐 Web query:

axe-core/cli environment variables CHROME_PATH CHROMEDRIVER_PATH chromium executable

💡 Result:

The @axe-core/cli provides command-line options to specify the paths for the Chrome browser executable and the ChromeDriver executable, rather than relying on environment variables for these specific configurations [1][2]. To specify these paths, use the following command-line flags: --chrome-path: Use this flag followed by the absolute path to the Chrome browser executable [1]. This is useful when the CLI cannot automatically locate your Chrome installation or when you need to use a specific version [1]. --chromedriver-path: Use this flag followed by the absolute path to the ChromeDriver executable [1][2]. This allows you to point the CLI to a specific version of ChromeDriver, which is necessary if you encounter compatibility issues between your installed Chrome version and the default ChromeDriver [1][3]. Example usage: axe www.example.com --chrome-path="/path/to/chrome/binary" --chromedriver-path="/path/to/chromedriver/binary" While there are no specific environment variables for these paths, you can manage browser drivers using the recommended tool: npx browser-driver-manager install chrome: This command helps install and manage matching versions of Chrome and ChromeDriver, which is the preferred method for resolving version incompatibility errors [3]. Other configuration settings, such as browser type or headless mode, are typically managed via the axe config-selenium command or by editing the preferences file (typically located at ~/.config/preferences/com.deque.axe.cli.pref) [4]. Usage tracking can be disabled via the environment variable AXE_TRACK_USAGE=false [4].

Citations:


🌐 Web query:

lighthouse cli CHROME_PATH environment variable chromePath configuration

💡 Result:

To specify the path of the Chrome executable for the Lighthouse CLI, you can use the CHROME_PATH environment variable [1][2]. Setting this variable allows the underlying chrome-launcher to detect and use the specific Chrome installation you designate [2][3]. For Lighthouse CI (LHCI), there is a specific chromePath configuration option available in the configuration file, which provides a more explicit way to set the path [4][5]. The priority order for resolution in Lighthouse CI is: 1. The chromePath configuration option [4]. 2. The CHROME_PATH environment variable [4][5]. 3. The executable path found via puppeteer or puppeteer-core (if installed) [4]. 4. The highest priority installation detected by the chrome-launcher package [4]. While some users have requested a direct --chrome-path command-line flag for the standard Lighthouse CLI, it is not currently a native, supported flag; users are instead encouraged to rely on the CHROME_PATH environment variable [6].

Citations:


🌐 Web query:

treosh lighthouse ci action uploadArtifacts temporaryPublicStorage browser-driver-manager CHROME_PATH

💡 Result:

In GitHub Actions, treosh/lighthouse-ci-action provides convenient flags for managing Lighthouse report storage, while CHROME_PATH is a critical environment variable often required when running Lighthouse in headless CI environments. treosh/lighthouse-ci-action Configuration The treosh/lighthouse-ci-action supports direct configuration for report handling [1][2]: - uploadArtifacts (default: false): When set to true, this flag saves Lighthouse reports as GitHub Actions artifacts, allowing you to persist and download them from the action's run summary [1][3]. - temporaryPublicStorage (default: false): When set to true, this flag uploads your reports to Google's temporary public storage [1][3]. Reports uploaded this way are public and are automatically deleted after 7 days [1]. Because these are public, it is often recommended to use a private Lighthouse CI (LHCI) server if you are handling sensitive data [1][2]. CHROME_PATH and CI Environments When running Lighthouse in a CI environment like GitHub Actions (particularly on ubuntu-latest runners), the Lighthouse collector often requires a defined Chrome or Chromium executable [4][5]. If the runner does not have a stable version of Chrome pre-installed or detectable, you may encounter an error stating that the CHROME_PATH environment variable must be set [4]. To resolve this, you can use a browser-setup action (such as browser-actions/setup-chrome) to install Chrome and then export its path to the environment [4]: - Install Chrome: Use an action like browser-actions/setup-chrome to install the browser [4]. - Set the Path: Extract the output path from the setup step and set the CHROME_PATH environment variable [4]. Example workflow snippet [4]: - name: setup chrome uses: browser-actions/setup-chrome@v1 id: setup-chrome - name: Set CHROME_PATH run: echo "CHROME_PATH=${{ steps.setup-chrome.outputs.chrome-path }}" >> $GITHUB_ENV - name: Audit URLs using Lighthouse uses: treosh/lighthouse-ci-action@v12 with: urls: https://example.com uploadArtifacts: true temporaryPublicStorage: true browser-driver-manager While straker/browser-driver-manager is a utility for managing browser and driver installations (often for testing frameworks like Webdriver), it is not a direct requirement for the treosh/lighthouse-ci-action [6]. Its primary purpose is to provide local or CI environments with specific versions of Chrome and Chromedriver by managing their install paths in a.env file [6]. If used, you would need to read the path from that.env file and manually set the CHROME_PATH environment variable for your Lighthouse CI step, similar to the process described above [6].

Citations:


Activate the browser-driver-manager paths in the scans. browser-driver-manager stores Chrome/ChromeDriver paths in ~/.browser-driver-manager/.env, but neither workflow exports those paths or passes them to the scanners.

  • .github/workflows/a11y.yml#L34-L47: load the .env values and pass the matching --chrome-path and --chromedriver-path flags to npx --yes @axe-core/cli``.
  • .github/workflows/lighthouse.yml#L34-L41: export the downloaded Chrome executable path as CHROME_PATH, or configure chromePath in the Lighthouse CI config/action so it does not fall back to an incompatible system Chrome.
📍 Affects 2 files
  • .github/workflows/a11y.yml#L34-L36 (this comment)
  • .github/workflows/lighthouse.yml#L34-L36
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/a11y.yml around lines 34 - 36, Update
.github/workflows/a11y.yml lines 34-47 to load ~/.browser-driver-manager/.env
and pass its Chrome and ChromeDriver paths via --chrome-path and
--chromedriver-path to npx --yes `@axe-core/cli`. Update
.github/workflows/lighthouse.yml lines 34-41 to export the downloaded Chrome
executable as CHROME_PATH or configure chromePath in the Lighthouse CI
action/config, ensuring both scanners use the matching downloaded browser.


- name: Serve dist and scan
run: |
npx --yes serve dist -l 4321 &
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- name: Fetch metadata
id: metadata
uses: dependabot/fetch-metadata@v2
uses: dependabot/fetch-metadata@21025c705c08248db411dc16f3619e6b5f9ea21a # v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ jobs:
name: Typecheck (astro check)
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

- uses: actions/setup-node@v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
Comment on lines +45 to +47

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Disable checkout credential persistence across these workflows.

Each checkout is followed by repository-controlled npm or analysis commands. Add persist-credentials: false unless a later step explicitly needs Git authentication.

  • .github/workflows/ci.yml#L45-L47: add persist-credentials: false to the typecheck checkout.
  • .github/workflows/ci.yml#L61-L63: add it to the build checkout.
  • .github/workflows/ci.yml#L85-L87: add it to the test checkout.
  • .github/workflows/qlty.yml#L42-L44: add it to the qlty checkout.
  • .github/workflows/sonarqube.yml#L40-L42: add it to the SonarQube checkout.
🧰 Tools
🪛 zizmor (1.26.1)

[warning] 45-45: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 3 files
  • .github/workflows/ci.yml#L45-L47 (this comment)
  • .github/workflows/ci.yml#L61-L63
  • .github/workflows/ci.yml#L85-L87
  • .github/workflows/qlty.yml#L42-L44
  • .github/workflows/sonarqube.yml#L40-L42
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/ci.yml around lines 45 - 47, Disable credential
persistence on every listed checkout action by adding persist-credentials:
false: .github/workflows/ci.yml lines 45-47, 61-63, and 85-87;
.github/workflows/qlty.yml lines 42-44; and .github/workflows/sonarqube.yml
lines 40-42. Do not alter subsequent workflow steps.

Source: Linters/SAST tools

with:
node-version: 22
cache: npm
Expand All @@ -58,9 +58,9 @@ jobs:
name: Build
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

- uses: actions/setup-node@v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 22
cache: npm
Expand All @@ -71,7 +71,7 @@ jobs:
- run: npm run build

- name: Upload dist artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: dist
path: site/dist
Expand All @@ -82,9 +82,9 @@ jobs:
needs: [check-secrets]
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

- uses: actions/setup-node@v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 22
cache: npm
Expand All @@ -97,7 +97,7 @@ jobs:

- name: Upload coverage to Codecov
if: ${{ !cancelled() && needs.check-secrets.outputs.has-codecov == 'true' && hashFiles('site/coverage/lcov.info') != '' }}
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@0fb7174895f61a3b6b78fc075e0cd60383518dac # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: site/coverage/lcov.info
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,22 @@ jobs:
name: Codacy Security Scan
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== workflow checkout usages =="
rg -n "actions/checkout|persist-credentials" .github/workflows || true

echo
echo "== workflow files sizes =="
wc -l .github/workflows/codacy.yml .github/workflows/security.yml

echo
echo "== relevant workflow snippets =="
for f in .github/workflows/codacy.yml .github/workflows/security.yml; do
  echo "--- $f"
  nl -ba "$f" | sed -n '1,160p'
done

Repository: LUSKTECH/gl1tch.xyz

Length of output: 1822


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for f in .github/workflows/codacy.yml .github/workflows/security.yml .github/workflows/lighthouse.yml .github/workflows/a11y.yml .github/workflows/qlty.yml .github/workflows/sonarqube.yml .github/workflows/ci.yml; do
  [ -f "$ f" ] || true
done

for f in .github/workflows/codacy.yml .github/workflows/security.yml .github/workflows/lighthouse.yml .github/workflows/a11y.yml .github/workflows/qlty.yml .github/workflows/sonarqube.yml .github/workflows/ci.yml; do
  echo "--- $f"
  sed -n '1,170p' "$f"
done

echo "== all checkout step occurrences in workflows =="
grep -RIn "uses: actions/checkout@" .github/workflows || true

Repository: LUSKTECH/gl1tch.xyz

Length of output: 17148


🌐 Web query:

actions/checkout v5 persist-credentials default true documentation

💡 Result:

In the actions/checkout action, including version v5, the persist-credentials input defaults to true [1][2][3]. When persist-credentials is set to true (the default), the action configures the authentication token or SSH key in the local git configuration [1][4]. This allows subsequent steps in your workflow to execute authenticated git commands [1][4]. The action is designed to remove these credentials during the post-job cleanup process [1][4]. In v5, the implementation of this feature was updated to store credentials under $RUNNER_TEMP rather than directly in the local git config [5], a change intended to improve security by preventing accidental leakage, such as through artifact publishing [6][5]. Users who wish to opt out of this behavior and prevent the action from configuring git credentials can explicitly set persist-credentials: false [1][4].

Citations:


🌐 Web query:

actions/checkout v5 persist-credentials false source credentials local git config

💡 Result:

In actions/checkout, the persist-credentials input controls whether the action configures the authentication token or SSH key in the local git configuration [1][2][3]. When persist-credentials is set to the default value (true), the action automatically configures authentication credentials to enable your subsequent workflow steps to run authenticated Git commands [1][4][5]. In actions/checkout v5, these credentials were added to the repository's local git config [2]. In later versions (starting with v6), this behavior was updated to store credentials in a separate file within $RUNNER_TEMP, using Git's includeIf mechanism to reference them, which improves security by isolating the credentials from the main Git configuration [6][7][8]. Setting persist-credentials to false explicitly opts out of this behavior, meaning the action will not write any credentials to the local git configuration or temporary files [1][8]. This is a recommended security practice when your subsequent workflow steps do not require authenticated Git access, as it minimizes the risk of credential leakage [8]. In summary: - Default (true): Credentials are configured for use by subsequent steps [1][3]. - False: No credentials are configured, and the action performs only the initial checkout [1][8].

Citations:


Disable persisted checkout credentials where the workflow uses the checkout token.

In the scan workflows, the listed actions/checkout steps use the default persist-credentials: true, which leaves GITHUB_TOKEN available to later action and shell steps. Add persist-credentials: false where later job steps do not need authenticated Git operations.

🧰 Tools
🪛 zizmor (1.26.1)

[warning] 39-39: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false

(artipacked)

📍 Affects 2 files
  • .github/workflows/codacy.yml#L39-L39 (this comment)
  • .github/workflows/codacy.yml#L64-L64
  • .github/workflows/security.yml#L50-L52
  • .github/workflows/security.yml#L73-L73
  • .github/workflows/security.yml#L96-L96
  • .github/workflows/security.yml#L127-L127
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/codacy.yml at line 39, Update each listed actions/checkout
step in .github/workflows/codacy.yml at lines 39-39 and 64-64, and
.github/workflows/security.yml at lines 50-52, 73-73, 96-96, and 127-127, to set
persist-credentials to false. No other workflow steps require changes.

Source: Linters/SAST tools


- uses: codacy/codacy-analysis-cli-action@v4
- uses: codacy/codacy-analysis-cli-action@562ee3e92b8e92df8b67e0a5ff8aa8e261919c08 # v4
with:
format: sarif
output: results.sarif
gh-code-scanning-compat: true
max-allowed-issues: 2147483647
tool-timeout: 30m

- uses: github/codeql-action/upload-sarif@v3
- uses: github/codeql-action/upload-sarif@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
if: always()
continue-on-error: true
with:
sarif_file: results.sarif
category: codacy

codacy-coverage:
name: Codacy Coverage Upload
Expand All @@ -60,9 +62,9 @@ jobs:
run:
working-directory: ./site
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

- uses: actions/setup-node@v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 22
cache: npm
Expand All @@ -74,7 +76,7 @@ jobs:

- name: Upload coverage to Codacy
if: hashFiles('site/coverage/lcov.info') != ''
uses: codacy/codacy-coverage-reporter-action@v1
uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: site/coverage/lcov.info
Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
run:
working-directory: ./site
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

- uses: actions/setup-node@v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 22
cache: npm
Expand All @@ -31,8 +31,12 @@ jobs:

- run: npm run build

- name: Install matching Chrome + ChromeDriver
run: npx --yes browser-driver-manager install chrome
working-directory: .

- name: Run Lighthouse CI
uses: treosh/lighthouse-ci-action@v12
uses: treosh/lighthouse-ci-action@3e7e23fb74242897f95c0ba9cabad3d0227b9b18 # v12
with:
configPath: ./site/lighthouserc.cjs
uploadArtifacts: true
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/qlty.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ jobs:
run:
working-directory: ./site
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
fetch-depth: 0

- uses: actions/setup-node@v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 22
cache: npm
Expand All @@ -54,7 +54,7 @@ jobs:
- run: npm test --if-present -- --coverage

- name: Install qlty CLI
uses: qltysh/qlty-action/install@main
uses: qltysh/qlty-action/install@08a0a862c159eae9b9003081da6663d96efef637 # main

- name: Publish coverage to qlty
if: hashFiles('site/coverage/lcov.info') != ''
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,29 +47,30 @@ jobs:
name: Betterleaks Secrets Scan
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
fetch-depth: 0

- id: betterleaks
uses: dortort/betterleaks-action@v0.1.0
uses: dortort/betterleaks-action@cd0b905aa4befb8f42f8b1ab98150180c9e77515 # v0.1.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
report-format: sarif
fail-on-leak: 'true'

- uses: github/codeql-action/upload-sarif@v3
- uses: github/codeql-action/upload-sarif@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
if: always() && steps.betterleaks.outputs.sarif-path != ''
with:
sarif_file: ${{ steps.betterleaks.outputs.sarif-path }}
category: betterleaks

semgrep:
name: Semgrep SAST
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
container:
image: semgrep/semgrep
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

- name: Run Semgrep
env:
Expand All @@ -92,19 +93,20 @@ jobs:
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

- uses: actions/setup-node@v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 22
cache: npm
cache-dependency-path: site/package-lock.json

- run: npm ci

- uses: snyk/actions/setup@master
- uses: snyk/actions/setup@8e119fbb6c251787721d34ba683ed48eba792766 # master

- run: snyk test --severity-threshold=high --all-projects
continue-on-error: true

snyk-skip-notice:
name: Snyk Skip Notice
Expand All @@ -123,13 +125,13 @@ jobs:
actions: read
contents: read
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5

- uses: github/codeql-action/init@v3
- uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
with:
languages: javascript-typescript
queries: security-extended

- uses: github/codeql-action/analyze@v3
- uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4
with:
category: '/language:javascript-typescript'
10 changes: 6 additions & 4 deletions .github/workflows/sonarqube.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ jobs:
- id: sonar
env:
TOKEN: ${{ secrets.SONAR_TOKEN }}
HOST_URL: ${{ secrets.SONAR_HOST_URL }}
run: |
if [ -n "${TOKEN:-}" ]; then
if [ -n "${TOKEN:-}" ] && [ -n "${HOST_URL:-}" ]; then
echo "defined=true" >> "$GITHUB_OUTPUT"
else
echo "defined=false" >> "$GITHUB_OUTPUT"
Expand All @@ -37,11 +38,11 @@ jobs:
if: needs.check-secrets.outputs.has-sonar == 'true'
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5
with:
fetch-depth: 0

- uses: actions/setup-node@v5
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
with:
node-version: 22
cache: npm
Expand All @@ -53,7 +54,8 @@ jobs:
- working-directory: ./site
run: npm test --if-present -- --coverage || true

- uses: SonarSource/sonarqube-scan-action@v6
# nosemgrep: generic.secrets.security.detected-sonarqube-docs-api-key.detected-sonarqube-docs-api-key
- uses: SonarSource/sonarqube-scan-action@fd88b7d7ccbaefd23d8f36f73b59db7a3d246602 # v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Mark stale issues and PRs
runs-on: ${{ vars.CI_RUNNER || 'ubuntu-latest' }}
steps:
- uses: actions/stale@v9
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9
with:
days-before-stale: 30
days-before-close: 7
Expand Down
2 changes: 1 addition & 1 deletion site/lighthouserc.cjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
ci: {
collect: {
startServerCommand: 'npx serve dist -l 4321',
startServerCommand: 'npx serve site/dist -l 4321',
startServerReadyPattern: 'Accepting connections',
url: [
'http://localhost:4321/',
Expand Down
Loading
Loading