Skip to content

Commit 8c89f0e

Browse files
committed
actions: drop lockfile-extension generator from unpinned-tag PR
Removes the Go lockfile-extension-generator tool and its extractor autobuild hook, keeping this PR to its intended discussion scope: the $/ self-repository suppression plus the QL seam (pinnedByLockfileDataModel extensible predicate and the not pinnedByLockfile(...) clause). Parsing actions.lock and populating the predicate is extractor-team work on the CodeQL CLI cycle, and the tool here reimplemented the canonical parser at github.com/github/actions-lockfile rather than depending on it, so it would drift. It also wrote a model pack into the database that CodeQL does not auto-apply, so it never took effect without extra analysis flags. Better to scaffold the seam and let the extractor own population. Reverts the additions to actions/extractor/tools/autobuild.sh and deletes actions/extractor/tools/generate-lockfile-extension.sh and actions/extractor/tools/lockfile-extension-generator/. Query behavior and test expected output are unchanged; the CWE-829 query tests still pass.
1 parent 9a0eef7 commit 8c89f0e

16 files changed

Lines changed: 4 additions & 806 deletions

File tree

actions/extractor/tools/autobuild.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ else
3737
export LGTM_INDEX_FILTERS
3838
fi
3939

40-
# Capture the source root before handing off to the JavaScript autobuilder,
41-
# which may change the working directory. The Actions extractor runs from the
42-
# source root, so `pwd` here is the root of the repository being analysed.
43-
ACTIONS_SRC_ROOT="$(pwd)"
44-
4540
# Find the JavaScript extractor directory via `codeql resolve extractor`.
4641
CODEQL_EXTRACTOR_JAVASCRIPT_ROOT="$("${CODEQL_DIST}/codeql" resolve extractor --language javascript)"
4742
export CODEQL_EXTRACTOR_JAVASCRIPT_ROOT
@@ -60,12 +55,3 @@ env CODEQL_EXTRACTOR_JAVASCRIPT_DIAGNOSTIC_DIR="${CODEQL_EXTRACTOR_ACTIONS_DIAGN
6055
CODEQL_EXTRACTOR_JAVASCRIPT_TRAP_DIR="${CODEQL_EXTRACTOR_ACTIONS_TRAP_DIR}" \
6156
CODEQL_EXTRACTOR_JAVASCRIPT_WIP_DATABASE="${CODEQL_EXTRACTOR_ACTIONS_WIP_DATABASE}" \
6257
"${JAVASCRIPT_AUTO_BUILD}"
63-
64-
# Generate the lockfile-pinned data extension from the repository's Actions
65-
# lockfile, if present. This is a no-op for repositories without a lockfile.
66-
GENERATE_LOCKFILE_EXTENSION="$(CDPATH= cd "$(dirname "$0")" && pwd)/generate-lockfile-extension.sh"
67-
if [ -x "${GENERATE_LOCKFILE_EXTENSION}" ]; then
68-
echo "Generating lockfile-pinned data extension."
69-
"${GENERATE_LOCKFILE_EXTENSION}" "${ACTIONS_SRC_ROOT}" || \
70-
echo "Lockfile-pinned data extension generation failed; continuing without it." >&2
71-
fi

actions/extractor/tools/generate-lockfile-extension.sh

Lines changed: 0 additions & 93 deletions
This file was deleted.

actions/extractor/tools/lockfile-extension-generator/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

actions/extractor/tools/lockfile-extension-generator/README.md

Lines changed: 0 additions & 120 deletions
This file was deleted.

actions/extractor/tools/lockfile-extension-generator/generator.go

Lines changed: 0 additions & 130 deletions
This file was deleted.

0 commit comments

Comments
 (0)