File tree Expand file tree Collapse file tree
test/library-tests/actions-lock Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,7 +9,8 @@ $DefaultPathFilters = @(
99 ' include:.github/reusable_workflows/**/*.yml' ,
1010 ' include:.github/reusable_workflows/**/*.yaml' ,
1111 ' include:**/action.yml' ,
12- ' include:**/action.yaml'
12+ ' include:**/action.yaml' ,
13+ ' include:**/actions.lock'
1314)
1415
1516if ($null -ne $env: LGTM_INDEX_FILTERS ) {
Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ include:.github/reusable_workflows/**/*.yml
1414include:.github/reusable_workflows/**/*.yaml
1515include:**/action.yml
1616include:**/action.yaml
17+ include:**/actions.lock
1718END
1819)
1920
Original file line number Diff line number Diff line change 11import codeql.actions.Ast
2+ import codeql.actions.Lock
Original file line number Diff line number Diff line change 1+ ---
2+ category : feature
3+ ---
4+ * GitHub Actions databases now extract ` actions.lock ` files. The new ` ActionsLock ` class
5+ provides access to their YAML abstract syntax trees.
Original file line number Diff line number Diff line change 1+ /**
2+ * Provides classes for working with GitHub Actions lockfiles.
3+ */
4+
5+ private import codeql.actions.ast.internal.Yaml
6+
7+ /** An `actions.lock` file. */
8+ class ActionsLock extends YamlDocument {
9+ ActionsLock ( ) { this .getFile ( ) .getBaseName ( ) = "actions.lock" }
10+ }
Original file line number Diff line number Diff line change 1+ on : push
2+ jobs :
3+ test :
4+ runs-on : ubuntu-latest
5+ steps :
6+ - run : echo test
Original file line number Diff line number Diff line change 1+ # This file is machine-generated by `gh actions-lock`.
2+ # Do not edit by hand; run `gh actions-lock` to update.
3+ # Docs: https://gh.io/actions-lockfile
4+ version: 'v0.0.2'
5+ workflows:
6+ '.github/workflows/test.yml':
7+ - 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1'
8+ - 'github/codeql-action@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28'
9+ dependencies:
10+ 'actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1':
11+ ref: '3d3c42e5aac5ba805825da76410c181273ba90b1'
12+ commit: 'sha1-3d3c42e5aac5ba805825da76410c181273ba90b1'
13+ owner_id: 44036562
14+ repo_id: 197814629
15+ 'github/codeql-action@db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28':
16+ ref: 'v4.37.8'
17+ commit: 'sha1-db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28'
18+ owner_id: 9919
19+ repo_id: 259445878
Original file line number Diff line number Diff line change 1+ | actions.lock:0:0:0:0 | actions.lock |
Original file line number Diff line number Diff line change 1+ import codeql.actions.Lock
2+
3+ from ActionsLock lock
4+ select lock .getFile ( )
Original file line number Diff line number Diff line change @@ -404,6 +404,9 @@ private void setupFilters() {
404404 patterns .add ("**/*tsconfig*.json" );
405405 patterns .add ("**/codeql-javascript-*.json" );
406406
407+ // exclude lock files that are not explicitly included via `LGTM_INDEX_FILTERS`
408+ patterns .add ("-**/*.lock" );
409+
407410 // include any explicitly specified extensions
408411 for (String extension : fileTypes .keySet ()) patterns .add ("**/*" + extension );
409412
You can’t perform that action at this time.
0 commit comments