Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
3e7edd4
feat: Remove Bicep from Extractor
GeekMasher Jun 19, 2025
4c7fdc3
feat: Update Extractor and Cargo
GeekMasher Jun 19, 2025
9bda9f6
feat: Remove all libraries and queries for Bicep
GeekMasher Jun 19, 2025
ba853ea
feat: Remove Bicep from AST library
GeekMasher Jun 19, 2025
4910e8a
feat: Update Submodules
GeekMasher Jun 19, 2025
cd51ac7
feat: Update submodules
GeekMasher Jun 19, 2025
6f52b6d
feat: Update Packs, scripts, and Cargo
GeekMasher Jun 19, 2025
6062782
Merge branch 'main' of github.com:advanced-security/codeql-extractor-…
GeekMasher Aug 6, 2025
d022d69
refactor: remove unnecessary AWS provider import in AST.ql
GeekMasher Sep 3, 2025
adf893c
refactor: update action.yml for improved clarity and structure
GeekMasher Sep 3, 2025
8cc67f2
refactor: update ts_language initialization for HCL and Dockerfile
GeekMasher Sep 5, 2025
e13bcbd
refactor: update README structure and clarify project status
GeekMasher Sep 5, 2025
45c1544
Merge branch 'main' into bicep-removal
GeekMasher Sep 5, 2025
2b87b92
feat: Update Extractor TS submodules
GeekMasher Sep 5, 2025
b7b2e26
refactor: update tree-sitter dependency version and correct CodeQL ve…
GeekMasher Sep 5, 2025
7dbab8d
chore: update Cargo.lock to reflect dependency changes
GeekMasher Sep 5, 2025
f8fb807
feat(ci): enhance build workflow to include submodule checkout and Co…
GeekMasher Sep 8, 2025
9b3ab8a
chore: update dependencies in Cargo.toml and add README for extractor
GeekMasher Sep 8, 2025
6fc4f99
Update extractor/README.md
GeekMasher Sep 8, 2025
aef632b
chore: remove unused action job from build workflow
GeekMasher Sep 8, 2025
eea845a
Merge branch 'bicep-removal' of github.com:advanced-security/codeql-e…
GeekMasher Sep 8, 2025
1616322
feat: Remove Bicep Storage tests
GeekMasher Sep 8, 2025
b7aee20
fix: update CodeQL database creation command to use 'iac' language
GeekMasher Sep 8, 2025
5fea505
fix: update CodeQL analysis command to use the correct query path
GeekMasher Sep 8, 2025
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
95 changes: 77 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
steps:
- name: "Checkout"
uses: actions/checkout@v5
with:
submodules: true

- name: "Check for changes"
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
Expand Down Expand Up @@ -67,24 +69,82 @@ jobs:
run: |
./scripts/run-tests.sh "ql/test/${{ matrix.test-folders }}"

docs:
scanning:
runs-on: ubuntu-latest
needs: [tests]

strategy:
matrix:
project: ["hashicorp/terraform-guides", "akamai/terraform-examples", "aws-samples/aws-sam-terraform-examples"]

steps:
- uses: actions/checkout@v5
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
- name: "Checkout"
uses: actions/checkout@v5
with:
submodules: true

- name: "Checkout"
uses: actions/checkout@v5
with:
repository: ${{ matrix.project }}
path: project

- name: "Check for changes"
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: extractor-changes
with:
filters: |
src:
- '**.md'
# lint markdown
- name: "Lint Markdown"
if: steps.changes.outputs.src == 'true'
- 'extractor/**'
- 'rust-toolchain.toml'
- 'Cargo.*'

- name: "Download Extracter"
if: steps.extractor-changes.outputs.src == 'false'
env:
GH_TOKEN: ${{ github.token }}
run: |
npm install -g markdownlint-cli
markdownlint '**.md' --ignore node_modules --disable MD013
set -e
gh release list -L 1 -R "advanced-security/codeql-extractor-iac"

gh release download \
-R "advanced-security/codeql-extractor-iac" \
--clobber \
--pattern 'extractor-iac.tar.gz'

tar -zxf extractor-iac.tar.gz

- uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable
if: steps.extractor-changes.outputs.src == 'true'

- name: "Build Extractor"
if: steps.extractor-changes.outputs.src == 'true'
env:
GH_TOKEN: ${{ github.token }}
run: |
set -e
gh extensions install github/gh-codeql
gh codeql set-version latest

./scripts/create-extractor-pack.sh

gh codeql resolve languages --format=json --search-path ./extractor-pack

action:
- name: "Run CodeQL Analysis"
env:
GH_TOKEN: ${{ github.token }}
PROJECT_REPO: ${{ matrix.project }}
run: |
set -e
gh extensions install github/gh-codeql
gh codeql set-version latest

gh codeql database create iac-db --language=iac --source-root=./project --search-path ./extractor-pack

gh codeql database analyze iac-db "advanced-security/iac-queries" --format=sarifv2.1.0 --output="iac-${PROJECT_REPO}.sarif"


docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
Expand All @@ -93,11 +153,10 @@ jobs:
with:
filters: |
src:
- '.github/action/**'
- 'action.yml'

- name: Run action
- '**.md'
# lint markdown
- name: "Lint Markdown"
if: steps.changes.outputs.src == 'true'
uses: ./
with:
extractor-version: latest
run: |
npm install -g markdownlint-cli
markdownlint '**.md' --ignore node_modules --disable MD013
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "extractor/tree-sitter-hcl"]
path = extractor/tree-sitter-hcl
url = https://github.com/GeekMasher/tree-sitter-hcl
[submodule "extractor/tree-sitter-dockerfile"]
path = extractor/tree-sitter-dockerfile
url = https://github.com/GeekMasher/tree-sitter-dockerfile
Loading
Loading