Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/actions/trivy-iac/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Trivy IaC Scan"
description: "Scan Terraform IaC using Trivy"
runs:
using: "composite"
steps:
- name: "Trivy Terraform IaC Scan"
shell: bash
run: |
components_exit_code=0
modules_exit_code=0

./scripts/terraform/trivy-scan.sh --mode iac ./infrastructure/terraform/components || components_exit_code=$?
./scripts/terraform/trivy-scan.sh --mode iac ./infrastructure/terraform/modules || modules_exit_code=$?

if [ $components_exit_code -ne 0 ] || [ $modules_exit_code -ne 0 ]; then
echo "Trivy misconfigurations detected."
exit 1
fi
16 changes: 16 additions & 0 deletions .github/actions/trivy-package/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Trivy Package Scan"
description: "Scan project packages using Trivy"
runs:
using: "composite"
steps:
- name: "Trivy Package Scan"
shell: bash
run: |
exit_code=0

./scripts/terraform/trivy-scan.sh --mode package . || exit_code=$?

if [ $exit_code -ne 0 ]; then
echo "Trivy has detected package vulnerablilites. Please refer to https://nhsd-confluence.digital.nhs.uk/spaces/RIS/pages/1257636917/PLAT-KOP-012+-+Trivy+Pipeline+Vulnerability+Scanning+Exemption"
exit 1
fi
17 changes: 0 additions & 17 deletions .github/actions/trivy/action.yaml

This file was deleted.

29 changes: 23 additions & 6 deletions .github/workflows/stage-1-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,21 +146,38 @@ jobs:
uses: actions/checkout@v4
- name: "Lint Terraform"
uses: ./.github/actions/lint-terraform
trivy:
name: "Trivy Scan"
trivy-iac:
name: "Trivy IaC Scan"
permissions:
contents: read
runs-on: ubuntu-latest
timeout-minutes: 5
timeout-minutes: 10
needs: detect-terraform-changes
if: needs.detect-terraform-changes.outputs.terraform_changed == 'true'
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Setup ASDF"
uses: asdf-vm/actions/setup@v4
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
- name: "Perform Setup"
uses: ./.github/actions/setup
- name: "Trivy IaC Scan"
uses: ./.github/actions/trivy-iac
trivy-package:
name: "Trivy Package Scan"
permissions:
contents: read
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- name: "Setup ASDF"
uses: asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
- name: "Perform Setup"
uses: ./.github/actions/setup
- name: "Trivy Scan"
uses: ./.github/actions/trivy
- name: "Trivy Package Scan"
uses: ./.github/actions/trivy-package
count-lines-of-code:
name: "Count lines of code"
runs-on: ubuntu-latest
Expand Down
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ python 3.13.2
# The section below is reserved for Docker image versions.

# TODO: Move this section - consider using a different file for the repository template dependencies.
# docker/ghcr.io/anchore/grype v0.92.2@sha256:651e558f9ba84f2a790b3449c8a57cbbf4f34e004f7d3f14ae8f8cbeede4cd33 # SEE: https://github.com/anchore/grype/pkgs/container/grype
# docker/ghcr.io/anchore/syft v1.26.0@sha256:de078f51704a213906970b1475edd6006b8af50aa159852e125518237487b8c6 # SEE: https://github.com/anchore/syft/pkgs/container/syft
# docker/ghcr.io/anchore/grype v0.104.3@sha256:d340f4f8b3b7e6e72a6c9c0152f25402ed8a2d7375dba1dfce4e53115242feb6 # SEE: https://github.com/anchore/grype/pkgs/container/grype
# docker/ghcr.io/anchore/syft v1.39.0@sha256:6f13bb010923c33fb197047c8f88888e77071bd32596b3f605d62a133e493ce4 # SEE: https://github.com/anchore/syft/pkgs/container/syft
# docker/ghcr.io/gitleaks/gitleaks:v8.24.0@sha256:b8e9bf46893c2f20e10bfb4b2e783adaef519dea981b01ca6221ac325e836040 # SEE: https://github.com/gitleaks/gitleaks/pkgs/container/gitleaks
# docker/ghcr.io/igorshubovych/markdownlint-cli v0.37.0@sha256:fb3e79946fce78e1cde84d6798c6c2a55f2de11fc16606a40d49411e281d950d # SEE: https://github.com/igorshubovych/markdownlint-cli/pkgs/container/markdownlint-cli
# docker/ghcr.io/make-ops-tools/gocloc latest@sha256:6888e62e9ae693c4ebcfed9f1d86c70fd083868acb8815fe44b561b9a73b5032 # SEE: https://github.com/make-ops-tools/gocloc/pkgs/container/gocloc
Expand Down
2 changes: 1 addition & 1 deletion docs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ source "https://rubygems.org"
#
# This will help ensure the proper Jekyll version is running.
# Happy Jekylling!
gem "jekyll", "~> 4.3.3"
gem "jekyll", "~> 4.4.1"
# This is the default theme for new Jekyll sites. You may change this to anything you like.
gem "minima", "~> 2.5"
# If you want to use GitHub Pages, remove the "gem "jekyll"" above and
Expand Down
91 changes: 56 additions & 35 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,54 +1,65 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.4)
activesupport (8.1.1)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
json
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.6)
public_suffix (>= 2.0.2, < 6.0)
base64 (0.2.0)
bigdecimal (3.1.8)
cgi (0.4.2)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
addressable (2.8.8)
public_suffix (>= 2.0.2, < 8.0)
base64 (0.3.0)
bigdecimal (4.0.1)
cgi (0.5.1)
colorator (1.1.0)
concurrent-ruby (1.2.3)
connection_pool (2.4.1)
drb (2.2.1)
concurrent-ruby (1.3.6)
connection_pool (3.0.2)
csv (3.3.5)
drb (2.2.3)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
erb (4.0.4)
cgi (>= 0.3.3)
eventmachine (1.2.7)
ffi (1.16.3)
ffi (1.17.2-arm64-darwin)
ffi (1.17.2-x86_64-linux-gnu)
forwardable-extended (2.6.0)
gemoji (4.1.0)
google-protobuf (4.29.2-x86_64-linux)
google-protobuf (4.33.2-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.33.2-x86_64-linux-gnu)
bigdecimal
rake (>= 13)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
i18n (1.14.5)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
jekyll (4.3.3)
jekyll (4.4.1)
addressable (~> 2.4)
base64 (~> 0.2)
colorator (~> 1.0)
csv (~> 3.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
json (~> 2.6)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
mercenary (~> 0.3, >= 0.3.6)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
Expand All @@ -62,8 +73,8 @@ GEM
jekyll (>= 3.7, < 5.0)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-sass-converter (3.1.0)
sass-embedded (~> 1.75)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
Expand All @@ -72,54 +83,64 @@ GEM
gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
just-the-docs (0.8.2)
json (2.18.0)
just-the-docs (0.10.1)
jekyll (>= 3.8.5)
jekyll-include-cache
jekyll-seo-tag (>= 2.0)
rake (>= 12.3.1)
kramdown (2.4.0)
rexml
kramdown (2.5.1)
rexml (>= 3.3.9)
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
mercenary (0.4.0)
minima (2.5.1)
minima (2.5.2)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.24.1)
mutex_m (0.2.0)
nokogiri (1.18.9-x86_64-linux-gnu)
minitest (6.0.0)
prism (~> 1.5)
nokogiri (1.18.10-arm64-darwin)
racc (~> 1.4)
nokogiri (1.18.10-x86_64-linux-gnu)
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (5.0.5)
prism (1.6.0)
public_suffix (7.0.0)
racc (1.8.1)
rake (13.2.1)
rake (13.3.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.3.9)
rouge (4.2.1)
rexml (3.4.4)
rouge (4.6.1)
safe_yaml (1.0.5)
sass-embedded (1.83.0-x86_64-linux-gnu)
google-protobuf (~> 4.28)
sass-embedded (1.97.0-arm64-darwin)
google-protobuf (~> 4.31)
sass-embedded (1.97.0-x86_64-linux-gnu)
google-protobuf (~> 4.31)
securerandom (0.4.1)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
webrick (1.8.2)
unicode-display_width (2.6.0)
uri (1.1.1)
webrick (1.9.2)

PLATFORMS
arm64-darwin-25
x86_64-linux

DEPENDENCIES
http_parser.rb (~> 0.6.0)
jekyll (~> 4.3.3)
jekyll (~> 4.4.1)
jekyll-drawio
jekyll-feed (~> 0.12)
jemoji
Expand Down
2 changes: 1 addition & 1 deletion docs/adr/assets/ADR-003/examples/golang/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ toolchain go1.24.1

require (
github.com/go-resty/resty/v2 v2.7.0
github.com/golang-jwt/jwt v3.2.2+incompatible
github.com/golang-jwt/jwt v5.3.0+incompatible
)

require golang.org/x/net v0.38.0 // indirect
1 change: 1 addition & 0 deletions scripts/config/trivy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ exit-code: 1 # When issues are found
scan:
skip-files:
- "**/.terraform/**/*"
- "**/node_modules/**/*"
Loading
Loading