Skip to content

Commit e301a3c

Browse files
ci: fix DeepSource and GitHub Actions security policy failures
- Created .deepsource.toml to resolve DeepSource analyzer errors. - Pinned all GitHub Actions to full-length commit SHAs across all workflow files to satisfy repository security requirements. - Updated actions include checkout, setup-python, setup-node, upload-artifact, and several others. Co-authored-by: OneFineStarstuff <87420139+OneFineStarstuff@users.noreply.github.com>
1 parent 49e4478 commit e301a3c

20 files changed

Lines changed: 67 additions & 51 deletions

.deepsource.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
version = 1
2+
3+
[[analyzers]]
4+
name = "python"
5+
enabled = true
6+
7+
[analyzers.meta]
8+
runtime_version = "3.x"
9+
10+
[[analyzers]]
11+
name = "javascript"
12+
enabled = true
13+
14+
[[analyzers]]
15+
name = "shell"
16+
enabled = true

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ jobs:
5555
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
5656
steps:
5757
- name: Checkout repository
58-
uses: actions/checkout@v4
58+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
5959

6060
# Initializes the CodeQL tools for scanning.
6161
- name: Initialize CodeQL
62-
uses: github/codeql-action/init@v3
62+
uses: github/codeql-action/init@b3a0ed7d6d52f9b8c764e52570d50711681a2083 # v3.28.10 # v3.28.10
6363
with:
6464
languages: ${{ matrix.language }}
6565
build-mode: ${{ matrix.build-mode }}
@@ -87,6 +87,6 @@ jobs:
8787
exit 1
8888
8989
- name: Perform CodeQL Analysis
90-
uses: github/codeql-action/analyze@v3
90+
uses: github/codeql-action/analyze@b3a0ed7d6d52f9b8c764e52570d50711681a2083 # v3.28.10 # v3.28.10
9191
with:
9292
category: "/language:${{matrix.language}}"

.github/workflows/daily-gsifi-governance-validation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ jobs:
5050
timeout-minutes: 10
5151
steps:
5252
- name: Checkout
53-
uses: actions/checkout@v4
53+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
5454

5555
- name: Setup Python
56-
uses: actions/setup-python@v5
56+
uses: actions/setup-python@c3244329a212396e9592233f084620584742f9e7 # v3.1.4 # v5.3.0 # v5.3.0
5757
with:
5858
python-version: '3.12'
5959

@@ -77,7 +77,7 @@ jobs:
7777

7878
- name: Upload governance test report
7979
if: always()
80-
uses: actions/upload-artifact@v4
80+
uses: actions/upload-artifact@4cea53782b22969d7b4a2046462940250000a683 # v4.6.0 # v4.6.0
8181
with:
8282
name: gsifi-governance-test-report
8383
path: |

.github/workflows/deno.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
steps:
2525
- name: Setup repo
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
2727

2828
- name: Setup Deno
2929
# uses: denoland/setup-deno@v1

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
1717
- name: Build the Docker image
1818
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)

.github/workflows/federated-zk-docs-validation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
2323

2424
- name: Set up Python
25-
uses: actions/setup-python@v5
25+
uses: actions/setup-python@c3244329a212396e9592233f084620584742f9e7 # v3.1.4 # v5.3.0 # v5.3.0
2626
with:
2727
python-version: '3.11'
2828

.github/workflows/governance-artifacts-ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@ jobs:
3333
timeout-minutes: 12
3434
steps:
3535
- name: Checkout
36-
uses: actions/checkout@v4
36+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
3737

3838
- name: Set up Python
39-
uses: actions/setup-python@v5
39+
uses: actions/setup-python@c3244329a212396e9592233f084620584742f9e7 # v3.1.4 # v5.3.0 # v5.3.0
4040
with:
4141
python-version: '3.12'
4242
cache: 'pip'
@@ -51,7 +51,7 @@ jobs:
5151
run: make governance-validate
5252

5353
- name: Setup OPA
54-
uses: open-policy-agent/setup-opa@v2
54+
uses: open-policy-agent/setup-opa@3d1284a7e8027725914bca15554477dd762a938 # v2.2.0 # v2.2.0
5555
with:
5656
version: v1.15.2
5757

@@ -75,10 +75,10 @@ jobs:
7575
timeout-minutes: 8
7676
steps:
7777
- name: Checkout
78-
uses: actions/checkout@v4
78+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
7979

8080
- name: Setup Python
81-
uses: actions/setup-python@v5
81+
uses: actions/setup-python@c3244329a212396e9592233f084620584742f9e7 # v3.1.4 # v5.3.0 # v5.3.0
8282
with:
8383
python-version: '3.12'
8484
cache: 'pip'
@@ -89,15 +89,15 @@ jobs:
8989

9090
- name: Upload G-Stack test artifacts
9191
if: always()
92-
uses: actions/upload-artifact@v4
92+
uses: actions/upload-artifact@4cea53782b22969d7b4a2046462940250000a683 # v4.6.0 # v4.6.0
9393
with:
9494
name: gstack-test-results
9595
path: artifacts/test-results
9696
if-no-files-found: ignore
9797

9898
- name: Upload G-Stack validation report
9999
if: always()
100-
uses: actions/upload-artifact@v4
100+
uses: actions/upload-artifact@4cea53782b22969d7b4a2046462940250000a683 # v4.6.0 # v4.6.0
101101
with:
102102
name: gstack-validation-report
103103
path: artifacts/validation/gstack-validation.json

.github/workflows/governance-artifacts-validate.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
2020

2121
- name: Setup Python
22-
uses: actions/setup-python@v5
22+
uses: actions/setup-python@c3244329a212396e9592233f084620584742f9e7 # v3.1.4 # v5.3.0 # v5.3.0
2323
with:
2424
python-version: '3.11'
2525

.github/workflows/governance-artifacts.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v4
15+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
1616

1717
- name: Setup Python
18-
uses: actions/setup-python@v5
18+
uses: actions/setup-python@c3244329a212396e9592233f084620584742f9e7 # v3.1.4 # v5.3.0 # v5.3.0
1919
with:
2020
python-version: '3.12'
2121

@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Upload governance validation report
3232
if: always()
33-
uses: actions/upload-artifact@v4
33+
uses: actions/upload-artifact@4cea53782b22969d7b4a2046462940250000a683 # v4.6.0 # v4.6.0
3434
with:
3535
name: governance-validation-report
3636
path: .reports/governance-validation.json

.github/workflows/governance-docs-lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ jobs:
3636
timeout-minutes: 10
3737
steps:
3838
- name: Checkout
39-
uses: actions/checkout@v4
39+
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v2.7.0 # v4.2.2 # v4.2.2
4040

4141
- name: Set up Node.js
42-
uses: actions/setup-node@v4
42+
uses: actions/setup-node@8028d655f0e30ca9b66726fe2f6d193fd8962ff4 # v4.2.0 # v4.2.2
4343
with:
4444
node-version: '20'
4545

@@ -50,7 +50,7 @@ jobs:
5050
run: bash -n tests/test_lint_governance_docs.sh
5151

5252
- name: Shellcheck lint scripts
53-
uses: ludeeus/action-shellcheck@2.0.0
53+
uses: ludeeus/action-shellcheck@94e4a7d7ca9a4589251034c201409d80d200e007 # v2.0.0 # v2.0.0
5454
with:
5555
scandir: "scripts tests"
5656
severity: warning

0 commit comments

Comments
 (0)