Skip to content

Commit ff0e7b9

Browse files
committed
Updating tags with SHA commits and updating access permissions.
Signed-off-by: lakshmj <lakshman.mj@cloud.com>
1 parent 7fb0193 commit ff0e7b9

7 files changed

Lines changed: 44 additions & 21 deletions

File tree

.github/workflows/ah_token_refresh.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@ on:
55
schedule:
66
- cron: "0 12 1,15 * *" # run 12pm on the 1st and 15th of the month
77
workflow_dispatch:
8+
permissions: read-all
89
jobs:
910
refresh:
10-
uses: ansible/ansible-content-actions/.github/workflows/refresh_ah_token.yaml@main
11+
uses: ansible/ansible-content-actions/.github/workflows/refresh_ah_token.yaml@8d811a21e588dc6692299797e9a2bab1205365dc # main
1112
with:
1213
environment: release
1314
secrets:

.github/workflows/bandit.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@ on:
66
push:
77
branches:
88
- main
9+
permissions: read-all
910
jobs:
1011
bandit-check:
1112
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
security-events: write
1216
steps:
1317
- name: Checkout code
14-
uses: actions/checkout@v6
18+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1519

1620
- name: Set up Python
17-
uses: actions/setup-python@v6
21+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
1822
with:
1923
python-version: '3.x'
2024

@@ -32,7 +36,7 @@ jobs:
3236
cat bandit-output.sarif
3337
3438
- name: Upload Bandit scan results to GitHub Security tab
35-
uses: github/codeql-action/upload-sarif@v4
39+
uses: github/codeql-action/upload-sarif@256d634097be96e792d6764f9edaefc4320557b1 # v4
3640
with:
3741
sarif_file: "bandit-output.sarif"
3842

.github/workflows/lint.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,27 @@ on:
2020
- .whitesource
2121
- .yamlfmt
2222
- .yamllint
23+
permissions: read-all
2324
jobs:
2425
ansible-lint:
2526
name: ansible-lint
2627
runs-on: ubuntu-latest
28+
permissions:
29+
contents: read
30+
security-events: write
2731
steps:
2832
# Important: This sets up your GITHUB_WORKSPACE environment variable
29-
- uses: actions/checkout@v6
33+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3034
- name: Set up Python 3.11
31-
uses: actions/setup-python@v6
35+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3236
with:
3337
python-version: 3.11
3438
- name: Install ansible-lint
3539
run: python -m pip install ansible-lint
3640
- name: Run ansible-lint
3741
run: ansible-lint
3842
- name: Upload SARIF file
39-
uses: github/codeql-action/upload-sarif@v4
43+
uses: github/codeql-action/upload-sarif@256d634097be96e792d6764f9edaefc4320557b1 # v4
4044
with:
4145
# Path to SARIF file relative to the root of the repository
4246
sarif_file: ansible_lint_result.sarif

.github/workflows/release.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@ name: Release the ansible collection to Ansible Galaxy and Ansible Automation Hu
33
on:
44
release:
55
types: [published]
6+
permissions: read-all
67
jobs:
78
release:
8-
uses: ansible/team-devtools/.github/workflows/release_collection.yml@main
9+
permissions:
10+
contents: write
11+
uses: ansible/team-devtools/.github/workflows/release_collection.yml@a7f2500fb428f217418c6c39c016319cd76df408 # main
912
with:
1013
environment: release
1114
secrets:

.github/workflows/scorecard.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333

3434
steps:
3535
- name: "Checkout code"
36-
uses: actions/checkout@v6
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3737
with:
3838
persist-credentials: false
3939

4040
- name: "Run analysis"
41-
uses: ossf/scorecard-action@v2.4.3
41+
uses: ossf/scorecard-action@99c09fe975337306107572b4fdf4db224cf8e2f2 # v2.4.3
4242
with:
4343
results_file: results.sarif
4444
results_format: sarif
@@ -60,7 +60,7 @@ jobs:
6060
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6161
# format to the repository Actions tab.
6262
- name: "Upload artifact"
63-
uses: actions/upload-artifact@v7
63+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
6464
with:
6565
name: SARIF file
6666
path: results.sarif
@@ -69,6 +69,6 @@ jobs:
6969
# Upload the results to GitHub's code scanning dashboard (optional).
7070
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7171
- name: "Upload to code-scanning"
72-
uses: github/codeql-action/upload-sarif@v4
72+
uses: github/codeql-action/upload-sarif@256d634097be96e792d6764f9edaefc4320557b1 # v4
7373
with:
7474
sarif_file: results.sarif

.github/workflows/test.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,26 @@ on:
1212
paths:
1313
- plugins/**
1414
- tests/**
15+
permissions: read-all
1516
jobs:
1617
ansible-galaxy-importer:
1718
name: ansible-galaxy-importer
1819
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
1922
strategy:
2023
matrix:
2124
python-version:
2225
- "3.11"
2326
steps:
2427
- name: Checkout the repo
25-
uses: actions/checkout@v6
28+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2629
- name: Build the collection
2730
run: |
2831
echo "> ansible-galaxy collection build --force"
2932
ansible-galaxy collection build --force
3033
- name: Setup Python ${{ matrix.python-version }}
31-
uses: actions/setup-python@v6
34+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
3235
with:
3336
python-version: ${{ matrix.python-version }}
3437
cache: "pip"
@@ -48,14 +51,16 @@ jobs:
4851
exit 1
4952
fi
5053
- name: Archive recent build
51-
uses: actions/upload-artifact@v7
54+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
5255
with:
5356
name: collection-build
5457
path: netscaler-adc-*.tar.gz
5558
retention-days: 1
5659
sanity-test:
5760
name: Sanity test with Ansible ${{ matrix.ansible }} and Python ${{ matrix.python-version }}
5861
runs-on: ubuntu-latest
62+
permissions:
63+
contents: read
5964
strategy:
6065
matrix:
6166
ansible:
@@ -66,9 +71,9 @@ jobs:
6671
- "3.11"
6772
steps:
6873
- name: Checkout the repo
69-
uses: actions/checkout@v6
74+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7075
- name: Set up Python ${{ matrix.python-version }}
71-
uses: actions/setup-python@v6
76+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
7277
with:
7378
python-version: ${{ matrix.python-version }}
7479
- name: Install dependencies
@@ -108,6 +113,8 @@ jobs:
108113
Integration test with Ansible ${{ matrix.ansible }} and Python ${{ matrix.python-version }}
109114
against NetScaler ${{ matrix.netscaler-version }}
110115
runs-on: ubuntu-latest
116+
permissions:
117+
contents: read
111118
strategy:
112119
matrix:
113120
ansible:
@@ -119,7 +126,7 @@ jobs:
119126
- 14.1-43.50
120127
steps:
121128
- name: Checkout the repo
122-
uses: actions/checkout@v6
129+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
123130
- name: Start NetScaler CPX container
124131
run: |
125132
# docker-compose -f "docker-compose.yml" up -d
@@ -162,7 +169,7 @@ jobs:
162169
echo "> curl -kL http://$NETSCALER_NSIP/nitro/v1/config/nsip -u nsroot:$NETSCALER_NITRO_PASS"
163170
curl -kL http://$NETSCALER_NSIP/nitro/v1/config/nsip -u nsroot:$NETSCALER_NITRO_PASS
164171
- name: Set up Python ${{ matrix.python-version }}
165-
uses: actions/setup-python@v6
172+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
166173
with:
167174
python-version: ${{ matrix.python-version }}
168175
- name: Install dependencies

.github/workflows/trivy.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@ on:
55
branches:
66
- main
77
pull_request:
8+
permissions: read-all
89
jobs:
910
trivy-check:
1011
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
security-events: write
1115
steps:
1216
- name: Checkout code
13-
uses: actions/checkout@v6
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1418

1519
- name: Run Trivy vulnerability scanner in repo mode
1620
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
@@ -23,7 +27,7 @@ jobs:
2327
severity: "UNKNOWN,LOW,MEDIUM,HIGH,CRITICAL"
2428

2529
- name: Upload Trivy scan results to GitHub Security tab
26-
uses: github/codeql-action/upload-sarif@v4
30+
uses: github/codeql-action/upload-sarif@256d634097be96e792d6764f9edaefc4320557b1 # v4
2731
if: always()
2832
with:
2933
sarif_file: "trivy-results.sarif"

0 commit comments

Comments
 (0)