Skip to content

Commit f693b3d

Browse files
authored
Merge pull request #223 from advanced-security/copilot-setup-steps
Create copilot-setup-steps.yml to install gh codeql
2 parents cac43f2 + e7dfa34 commit f693b3d

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ jobs:
4747
4848
tar -zxf extractor-iac.tar.gz
4949
50+
chmod +x extractor-pack/tools/*.sh
51+
chmod +x extractor-pack/tools/**/*
52+
5053
- uses: dtolnay/rust-toolchain@4305c38b25d97ef35a8ad1f985ccf2d2242004f2 # stable
5154
if: steps.extractor-changes.outputs.src == 'true'
5255

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: "Copilot Setup Steps"
3+
4+
# Automatically run the setup steps when they are changed to allow for
5+
# easy validation, and manual testing through the repository's Actions tab
6+
on:
7+
workflow_dispatch: {}
8+
push:
9+
paths:
10+
- .github/workflows/copilot-setup-steps.yml
11+
pull_request:
12+
paths:
13+
- .github/workflows/copilot-setup-steps.yml
14+
15+
jobs:
16+
# The job MUST be called `copilot-setup-steps` or it will not be picked up
17+
# by Copilot.
18+
copilot-setup-steps:
19+
runs-on: ubuntu-latest
20+
21+
# Set the permissions to the lowest permissions possible needed for your
22+
# steps. Copilot will be given its own token for its operations.
23+
permissions:
24+
# If you want to clone the repository as part of your setup steps, for
25+
# example to install dependencies, you'll need the `contents: read`
26+
# permission. If you don't clone the repository in your setup steps,
27+
# Copilot will do this for you automatically after the steps complete.
28+
contents: read
29+
30+
# You can define any steps you want, and they will run before the agent
31+
# starts. If you do not check out your code, Copilot will do this for you.
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
with:
36+
submodules: true
37+
38+
- name: Install GitHub CLI CodeQL extension
39+
env:
40+
GH_TOKEN: ${{ github.token }}
41+
run: |
42+
# Install GitHub CLI (should already be available in ubuntu-latest)
43+
gh --version
44+
45+
# Install CodeQL CLI extension
46+
gh extension install github/gh-codeql
47+
48+
# Set CodeQL to latest version
49+
gh codeql set-version latest
50+
51+
# Verify the extension is installed and working
52+
gh codeql version
53+
54+
# Install packs
55+
(cd ./ql/src/ && gh codeql pack install)
56+
(cd ./ql/lib/ && gh codeql pack install)
57+
(cd ./ql/test/ && gh codeql pack install)

0 commit comments

Comments
 (0)