Skip to content

Commit

Permalink
Create placeholder Actions QL packs
Browse files Browse the repository at this point in the history
  • Loading branch information
dbartol committed Oct 25, 2024
1 parent 47a7d24 commit dffc9e2
Show file tree
Hide file tree
Showing 11 changed files with 95 additions and 0 deletions.
1 change: 1 addition & 0 deletions actions/ql/lib/actions.qll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Placeholder
12 changes: 12 additions & 0 deletions actions/ql/lib/qlpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: codeql/actions-all
version: 0.0.1-dev
library: true
warnOnImplicitThis: true
dependencies:
codeql/util: ${workspace}
codeql/yaml: ${workspace}
codeql/controlflow: ${workspace}
codeql/dataflow: ${workspace}
codeql/javascript-all: ${workspace}
extractor: actions
groups: actions
16 changes: 16 additions & 0 deletions actions/ql/src/Placeholder.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/**
* @name Placeholder Query
* @description Placeholder
* @kind problem
* @problem.severity warning
* @security-severity 9.3
* @precision high
* @id actions/placeholder
* @tags actions
*/

import actions
import javascript

from File f
select f, "File"

Check warning

Code scanning / CodeQL

Missing security metadata Warning

This query file is missing a @tag security.

Check warning

Code scanning / CodeQL

Alert message style violation Warning

Alert message should end with a full stop.
8 changes: 8 additions & 0 deletions actions/ql/src/qlpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: codeql/actions-queries
version: 0.0.1-dev
library: false
groups: [actions, queries]
extractor: actions
dependencies:
codeql/actions-all: ${workspace}
warnOnImplicitThis: true
23 changes: 23 additions & 0 deletions actions/ql/test/library-tests/.github/workflows/shell.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: push

jobs:
job1:
runs-on: ubuntu-latest
steps:
- shell: pwsh
run: Write-Output "foo"
job2:
runs-on: ubuntu-latest
steps:
- run: echo "foo"

job3:
runs-on: windows-latest
steps:
- shell: bash
run: echo "foo"
job4:
runs-on: windows-latest
steps:
- run: Write-Output "foo"

1 change: 1 addition & 0 deletions actions/ql/test/library-tests/Placeholder.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| 1 |
1 change: 1 addition & 0 deletions actions/ql/test/library-tests/Placeholder.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
select 1
8 changes: 8 additions & 0 deletions actions/ql/test/qlpack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: codeql/actions-tests
groups: [codeql, test]
dependencies:
codeql/actions-all: ${workspace}
codeql/actions-queries: ${workspace}
extractor: actions
tests: .
warnOnImplicitThis: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on: push

jobs:
job1:
runs-on: ubuntu-latest
steps:
- shell: pwsh
run: Write-Output "foo"
job2:
runs-on: ubuntu-latest
steps:
- run: echo "foo"

job3:
runs-on: windows-latest
steps:
- shell: bash
run: echo "foo"
job4:
runs-on: windows-latest
steps:
- run: Write-Output "foo"

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| .github/workflows/shell.yml:0:0:0:0 | .github/workflows/shell.yml | File |
1 change: 1 addition & 0 deletions actions/ql/test/query-tests/Placeholder/Placeholder.qlref
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Placeholder.ql

0 comments on commit dffc9e2

Please sign in to comment.