Skip to content

CodeQL: three alerts open on main (redos in export-checks, missing workflow permissions) #28

Closed

Description

@stuffbucket

Three CodeQL alerts have been open against refs/heads/main since default setup
first ran (2026-08-15). None of them is introduced by a PR in flight, and none is
in the packages/maximal-core/dist/ bundle, so they are not covered by
maximal-core ADR-0001's bundle amendment.

# Rule Severity Location
2 js/polynomial-redos high packages/maximal-electron/scripts/export-checks.mjs:284
3 actions/missing-workflow-permissions medium .github/workflows/ci.yml:128
4 actions/missing-workflow-permissions medium .github/workflows/ci.yml:37

#2 — js/polynomial-redos

export function reExportedNames(source) {
  return [...source.matchAll(/export\s*\{([^}]+)}\s*from/g)]

CodeQL's message: "may run slow on strings starting with export{{ and with many
repetitions of export{{|."

reExportedNames is a build-verification helper: source is the bundle the build
just produced, read off disk in the same process. It is not request data and not
attacker-controlled, so the practical exposure is a slow local build rather than a
DoS. It is still a real quadratic backtrack and the regex is trivially rewritable,
which makes "fix it" cheaper than "argue about it" — but the fix edits a build
script, so it wants its own change rather than riding a feature branch.

#3 / #4 — actions/missing-workflow-permissions

.github/workflows/ci.yml declares no permissions: block, so both jobs inherit
the repository default token scope. Adding a least-privilege permissions: block
is the standard remedy, but CI permissions are exactly the kind of build mechanic
that should change deliberately and on its own, with a green run to prove nothing
depended on the wider scope.

Why this is filed rather than fixed

Both fixes touch build/CI mechanics. Raised while resolving the CodeQL alerts on
#25, which are a separate, bundle-only class.

Activity

  1. stuffbucket commented on Sep 7, 2026

    @stuffbucket
    OwnerAuthor

    Resolved by #51. CodeQL now reports alerts #2, #3, and #4 as fixed on refs/heads/main, and there are no open code-scanning alerts on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions