@@ -18,10 +18,12 @@ jobs:
1818 test-folders : ["library-tests", "queries-tests"]
1919 steps :
2020 - name : " Checkout"
21- uses : actions/checkout@v4
21+ uses : actions/checkout@v5
22+ with :
23+ submodules : true
2224
2325 - name : " Check for changes"
24- uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
26+ uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
2527 id : extractor-changes
2628 with :
2729 filters : |
3537 env :
3638 GH_TOKEN : ${{ github.token }}
3739 run : |
40+ set -e
3841 gh release list -L 1 -R "advanced-security/codeql-extractor-iac"
3942
4043 gh release download \
@@ -44,14 +47,18 @@ jobs:
4447
4548 tar -zxf extractor-iac.tar.gz
4649
47- - uses : dtolnay/rust-toolchain@nightly
50+ chmod +x extractor-pack/tools/*.sh
51+ chmod +x extractor-pack/tools/**/*
52+
53+ - uses : dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable
4854 if : steps.extractor-changes.outputs.src == 'true'
4955
5056 - name : " Build Extractor"
5157 if : steps.extractor-changes.outputs.src == 'true'
5258 env :
5359 GH_TOKEN : ${{ github.token }}
5460 run : |
61+ set -e
5562 gh extensions install github/gh-codeql
5663 gh codeql set-version latest
5764
@@ -65,11 +72,87 @@ jobs:
6572 run : |
6673 ./scripts/run-tests.sh "ql/test/${{ matrix.test-folders }}"
6774
75+ # scanning:
76+ # runs-on: ubuntu-latest
77+ # needs: [tests]
78+
79+ # strategy:
80+ # matrix:
81+ # # project: ["hashicorp/terraform-guides", "akamai/terraform-examples", "aws-samples/aws-sam-terraform-examples"]
82+ # project: []
83+
84+ # steps:
85+ # - name: "Checkout"
86+ # uses: actions/checkout@v5
87+ # with:
88+ # submodules: true
89+
90+ # - name: "Checkout"
91+ # uses: actions/checkout@v5
92+ # with:
93+ # repository: ${{ matrix.project }}
94+ # path: project
95+
96+ # - name: "Check for changes"
97+ # uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
98+ # id: extractor-changes
99+ # with:
100+ # filters: |
101+ # src:
102+ # - 'extractor/**'
103+ # - 'rust-toolchain.toml'
104+ # - 'Cargo.*'
105+
106+ # - name: "Download Extracter"
107+ # if: steps.extractor-changes.outputs.src == 'false'
108+ # env:
109+ # GH_TOKEN: ${{ github.token }}
110+ # run: |
111+ # set -e
112+ # gh release list -L 1 -R "advanced-security/codeql-extractor-iac"
113+
114+ # gh release download \
115+ # -R "advanced-security/codeql-extractor-iac" \
116+ # --clobber \
117+ # --pattern 'extractor-iac.tar.gz'
118+
119+ # tar -zxf extractor-iac.tar.gz
120+
121+ # - uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable
122+ # if: steps.extractor-changes.outputs.src == 'true'
123+
124+ # - name: "Build Extractor"
125+ # if: steps.extractor-changes.outputs.src == 'true'
126+ # env:
127+ # GH_TOKEN: ${{ github.token }}
128+ # run: |
129+ # set -e
130+ # gh extensions install github/gh-codeql
131+ # gh codeql set-version latest
132+
133+ # ./scripts/create-extractor-pack.sh
134+
135+ # gh codeql resolve languages --format=json --search-path ./extractor-pack
136+
137+ # - name: "Run CodeQL Analysis"
138+ # env:
139+ # GH_TOKEN: ${{ github.token }}
140+ # PROJECT_REPO: ${{ matrix.project }}
141+ # run: |
142+ # set -e
143+ # gh extensions install github/gh-codeql
144+ # gh codeql set-version latest
145+
146+ # gh codeql database create --language=iac --source-root=./project --search-path ./extractor-pack iac-db
147+
148+ # gh codeql database analyze --search-path ./extractor-pack --format sarif-latest --output="iac-${PROJECT_REPO}.sarif" iac-db ./ql/src
149+
150+
68151 docs :
69152 runs-on : ubuntu-latest
70153 steps :
71- - uses : actions/checkout@v4
72- - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
154+ - uses : actions/checkout@v5
155+ - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
73156 id : changes
74157 with :
75158 filters : |
@@ -81,21 +164,3 @@ jobs:
81164 run : |
82165 npm install -g markdownlint-cli
83166 markdownlint '**.md' --ignore node_modules --disable MD013
84-
85- action :
86- runs-on : ubuntu-latest
87- steps :
88- - uses : actions/checkout@v4
89- - uses : dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36
90- id : changes
91- with :
92- filters : |
93- src:
94- - '.github/action/**'
95- - 'action.yml'
96-
97- - name : Run action
98- if : steps.changes.outputs.src == 'true'
99- uses : ./
100- with :
101- extractor-version : latest
0 commit comments