Skip to content

Commit fae01dc

Browse files
Merge dependabot/go_modules/docs/adr/assets/ADR-003/examples/golang/go_modules-c153b83258 into dependabotCombined
2 parents dd543a7 + cff3da8 commit fae01dc

File tree

34 files changed

+663
-67
lines changed

34 files changed

+663
-67
lines changed

.github/actions/create-lines-of-code-report/action.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232
run: zip lines-of-code-report.json.zip lines-of-code-report.json
3333
- name: "Upload CLOC report as an artefact"
3434
if: ${{ !env.ACT }}
35-
uses: actions/upload-artifact@v3
35+
uses: actions/upload-artifact@v4
3636
with:
3737
name: lines-of-code-report.json.zip
3838
path: ./lines-of-code-report.json.zip

.github/actions/scan-dependencies/action.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ runs:
3232
run: zip sbom-repository-report.json.zip sbom-repository-report.json
3333
- name: "Upload SBOM report as an artefact"
3434
if: ${{ !env.ACT }}
35-
uses: actions/upload-artifact@v3
35+
uses: actions/upload-artifact@v4
3636
with:
3737
name: sbom-repository-report.json.zip
3838
path: ./sbom-repository-report.json.zip
@@ -47,7 +47,7 @@ runs:
4747
run: zip vulnerabilities-repository-report.json.zip vulnerabilities-repository-report.json
4848
- name: "Upload vulnerabilities report as an artefact"
4949
if: ${{ !env.ACT }}
50-
uses: actions/upload-artifact@v3
50+
uses: actions/upload-artifact@v4
5151
with:
5252
name: vulnerabilities-repository-report.json.zip
5353
path: ./vulnerabilities-repository-report.json.zip

.github/actions/tfsec/action.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ runs:
66
- name: "TFSec Scan - Components"
77
shell: bash
88
run: |
9-
for component in $(find infrastructure/terraform/components -mindepth 1 -type d); do
10-
scripts/terraform/tfsec.sh $component
11-
done
12-
- name: "TFSec Scan - Modules"
13-
shell: bash
14-
run: |
15-
for module in $(find infrastructure/terraform/modules -mindepth 1 -type d); do
16-
scripts/terraform/tfsec.sh $module
17-
done
9+
components_exit_code=0
10+
modules_exit_code=0
11+
12+
./scripts/terraform/tfsec.sh ./infrastructure/terraform/components || components_exit_code=$?
13+
./scripts/terraform/tfsec.sh ./infrastructure/terraform/modules || modules_exit_code=$?
14+
15+
if [ $components_exit_code -ne 0 ] || [ $modules_exit_code -ne 0 ]; then
16+
echo "One or more TFSec scans failed."
17+
exit 1
18+
fi

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ jobs:
4040
echo "build_datetime=$datetime" >> $GITHUB_OUTPUT
4141
echo "build_timestamp=$(date --date=$datetime -u +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
4242
echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
43-
echo "nodejs_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
44-
echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
45-
echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
43+
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
44+
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
45+
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
4646
echo "version=$(echo $version)" >> $GITHUB_OUTPUT
4747
echo "is_version_prerelease=$(if [[ $version == *-* ]]; then echo "true"; else echo "false"; fi)" >> $GITHUB_OUTPUT
4848

.github/workflows/cicd-3-deploy.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ jobs:
4545
echo "build_datetime=$datetime" >> $GITHUB_OUTPUT
4646
echo "build_timestamp=$(date --date=$datetime -u +'%Y%m%d%H%M%S')" >> $GITHUB_OUTPUT
4747
echo "build_epoch=$(date --date=$datetime -u +'%s')" >> $GITHUB_OUTPUT
48-
echo "nodejs_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
49-
echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
50-
echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
48+
echo "nodejs_version=$(grep "^nodejs\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
49+
echo "python_version=$(grep "^python\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
50+
echo "terraform_version=$(grep "^terraform\s" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
5151
# TODO: Get the version, but it may not be the .version file as this should come from the CI/CD Pull Request Workflow
5252
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
5353
# echo "tag=${{ github.event.inputs.tag }}" >> $GITHUB_OUTPUT

.github/workflows/scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6060
# format to the repository Actions tab.
6161
- name: "Upload artifact"
62-
uses: actions/upload-artifact@97a0fba1372883ab732affbe8f94b823f91727db # v3.pre.node20
62+
uses: actions/upload-artifact@v4
6363
with:
6464
name: SARIF file
6565
path: results.sarif
@@ -68,6 +68,6 @@ jobs:
6868
# Upload the results to GitHub's code scanning dashboard (optional).
6969
# Commenting out will disable upload of results to your repo's Code Scanning dashboard
7070
- name: "Upload to code-scanning"
71-
uses: github/codeql-action/upload-sarif@1b1aada464948af03b950897e5eb522f92603cc2 # v3.24.9
71+
uses: github/codeql-action/upload-sarif@9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0 # v3.28.9
7272
with:
7373
sarif_file: results.sarif

.github/workflows/stage-1-commit.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,30 @@ jobs:
6666
fetch-depth: 0 # Full history is needed to compare branches
6767
- name: "Check Markdown format"
6868
uses: ./.github/actions/check-markdown-format
69+
terraform-docs:
70+
name: "Run terraform-docs"
71+
runs-on: ubuntu-latest
72+
needs: detect-terraform-changes
73+
if: needs.detect-terraform-changes.outputs.terraform_changed == 'true'
74+
permissions:
75+
contents: write
76+
steps:
77+
- name: "Checkout code"
78+
uses: actions/checkout@v4
79+
with:
80+
fetch-depth: 0 # Full history is needed to compare branches
81+
- name: "Check to see if Terraform Docs are up-to-date"
82+
run: |
83+
make terraform-docs
84+
- name: "Stage changes"
85+
run: |
86+
git add infrastructure/terraform/**/*.md
87+
- name: "Check for changes in Terraform Docs"
88+
run: |
89+
if git diff --cached --name-only | grep -qE '\.md$'; then
90+
echo "Markdown files have changed. Please run 'make terraform-docs' and commit the changes."
91+
exit 1
92+
fi
6993
check-english-usage:
7094
name: "Check English usage"
7195
runs-on: ubuntu-latest

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ act 0.2.64
22
gitleaks 8.18.4
33
pre-commit 3.6.0
44
terraform 1.9.2
5+
terraform-docs 0.19.0
56
tfsec 1.28.10
67
vale 3.6.0
78

docs/Gemfile.lock

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ GEM
2929
ffi (1.16.3)
3030
forwardable-extended (2.6.0)
3131
gemoji (4.1.0)
32-
google-protobuf (3.25.3-x86_64-linux)
32+
google-protobuf (4.29.2-x86_64-linux)
33+
bigdecimal
34+
rake (>= 13)
3335
html-pipeline (2.14.3)
3436
activesupport (>= 2)
3537
nokogiri (>= 1.4)
@@ -100,13 +102,12 @@ GEM
100102
rb-fsevent (0.11.2)
101103
rb-inotify (0.11.1)
102104
ffi (~> 1.0)
103-
rexml (3.2.8)
104-
strscan (>= 3.0.9)
105+
rexml (3.3.6)
106+
strscan
105107
rouge (4.2.1)
106108
safe_yaml (1.0.5)
107-
sass-embedded (1.69.5)
108-
google-protobuf (~> 3.23)
109-
rake (>= 13.0.0)
109+
sass-embedded (1.83.0-x86_64-linux-gnu)
110+
google-protobuf (~> 4.28)
110111
strscan (3.1.0)
111112
terminal-table (3.0.2)
112113
unicode-display_width (>= 1.1.1, < 3)
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
module github-app-get-tokent
22

33
go 1.21.0
4+
toolchain go1.23.7
45

56
require (
67
github.com/go-resty/resty/v2 v2.7.0
78
github.com/golang-jwt/jwt v3.2.2+incompatible
89
)
910

10-
require golang.org/x/net v0.23.0 // indirect
11+
require golang.org/x/net v0.36.0 // indirect

0 commit comments

Comments
 (0)