Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
45f9426
Add communal Qc. Fix pr-link
wildjames Oct 21, 2024
fccd409
Move to fixed QQC version
wildjames Oct 22, 2024
0861016
Merge branch 'main' into aea-4506-communal-qc
wildjames Oct 22, 2024
b837f9d
Merge branch 'main' into aea-4506-communal-qc
wildjames Oct 23, 2024
c0448cf
Move to version with optional Java install
wildjames Oct 23, 2024
e2c3894
Add ignore list for secret scanning
wildjames Oct 23, 2024
12e1159
Missing ignore
wildjames Oct 23, 2024
0954661
Bump
wildjames Oct 23, 2024
a1f336a
Bump
wildjames Oct 23, 2024
8be4875
Bump
wildjames Oct 23, 2024
4e18dac
Add java sonar scanning
wildjames Oct 23, 2024
ff7d360
Fix sonar flow
wildjames Oct 23, 2024
e27efdb
Fix workflow
wildjames Oct 23, 2024
d8271f7
Remove extra sonar scan
wildjames Oct 23, 2024
cdebc39
Upgrade: [dependabot] - bump fhir.version from 7.4.4 to 7.4.5 (#209)
dependabot[bot] Oct 23, 2024
49cfb5a
update gitallowed for secret scanning
wildjames Oct 25, 2024
d334236
Redirect to QC version (TODO: BUMP TO v3.1.0)
wildjames Oct 25, 2024
6021d8d
Redirect to QC version (TODO: BUMP TO v3.1.0)
wildjames Oct 25, 2024
23ce949
Move to latest QC version
wildjames Nov 6, 2024
8421eb9
Upgrade: [dependabot] - bump org.apache.maven.plugins:maven-dependenc…
dependabot[bot] Oct 28, 2024
798ecd5
Upgrade: [dependabot] - bump semantic-release from 24.1.3 to 24.2.0 (…
dependabot[bot] Oct 28, 2024
2f5c652
Upgrade: [dependabot] - bump cfn-lint from 1.18.1 to 1.18.2 (#212)
dependabot[bot] Oct 29, 2024
bb85417
Upgrade: [dependabot] - bump fasterxml.version from 2.18.0 to 2.18.1 …
dependabot[bot] Oct 29, 2024
7cf4318
update patterns
wildjames Nov 6, 2024
d2c2c88
Literal slashes
wildjames Nov 6, 2024
f9c4bb4
Merge remote-tracking branch 'origin/main' into aea-4506-communal-qc
wildjames Nov 28, 2024
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
33 changes: 33 additions & 0 deletions .gitallowed
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Allow GitHub workflow secrets and tokens
token: ?"?\$\{\{\s*secrets\.GITHUB_TOKEN\s*\}\}"?
github-token: ?"?\$\{\{\s*secrets\.GITHUB_TOKEN\s*\}\}"?
token: ?"?\$\{\{\s*secrets\.DEPENDABOT_TOKEN\s*\}\}"?
id-token: write
--token=\$\{\{\s*steps\.generate-token\.outputs\.token\s*\}\}
--token=\$GITHUB-TOKEN

# Allow CIDR blocks in CloudFormation templates and related files
CidrBlock: "10\.\d{1,3}\.\d{1,3}\.\d{1,3}/\d{1,2}"
DestinationCidrBlock: "0\.0\.0\.0/0"

# Java corretto is not a secret
.*java corretto.*

# Allow standard code in JSON files for FHIR compliance testing
"code": "1\.2\.840\.10065\.1\.12\.1\.1"

# Allow IP in X-Forwarded-For header in test files
.*\"X-Forwarded-For\": \"86\.5\.218\.71\".*

# Allow version for AspectJ in pom.xml
<aspectj\.version>1\.9\.22\.1</aspectj\.version>

^.*pom\.xml:.*<version>([^<]+)</version>.*$
^.*Gemfile\.lock:.*$
^.*\.java:.*\\"id\\":\\"([0-9a-f\-]+)\\".*$

# General ones
.*\.gitallowed.*
.*nhsd-rules-deny.txt.*
.*\.venv.*
.*node_modules.*
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ env:

jobs:
quality_checks:
uses: ./.github/workflows/quality_checks.yml
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.0.0
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
install_java: true

get_commit_id:
runs-on: ubuntu-latest
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/pr-link.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,25 @@ jobs:

- name: Grab ticket name
if: contains(github.event.pull_request.head.ref, 'aea-') || contains(github.event.pull_request.head.ref, 'AEA-') || contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
run: echo name=TICKET_NAME::"$(echo "$REF" | grep -i -o '\(aea-[0-9]\+\)\|\(apm-[0-9]\+\)\|\(apmspii-[0-9]\+\)\|\(adz-[0-9]\+\)|\(amb-[0-9]\+\)' | tr '[:lower:]' '[:upper:]')" >> "$GITHUB_ENV"
continue-on-error: true
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
run: |
# Match ticket name patterns
REGEX='
(aea-[0-9]+)|
(apm-[0-9]+)|
(apmspii-[0-9]+)|
(adz-[0-9]+)|
(amb-[0-9]+)
'

# Remove whitespace and newlines from the regex
REGEX=$(echo "$REGEX" | tr -d '[:space:]')

# Extract the ticket name and convert to uppercase
TICKET_NAME=$(echo "$REF" | grep -i -E -o "$REGEX" | tr '[:lower:]' '[:upper:]')

# Set the environment variable
echo "TICKET_NAME=$TICKET_NAME" >> "$GITHUB_ENV"

- name: Comment on PR with link to JIRA ticket
if: contains(github.event.pull_request.head.ref, 'aea-') || contains(github.event.pull_request.head.ref, 'AEA-') || contains(github.event.pull_request.head.ref, 'apm-') || contains(github.event.pull_request.head.ref, 'APM-') || contains(github.event.pull_request.head.ref, 'apmspii-') || contains(github.event.pull_request.head.ref, 'APMSPII-') || contains(github.event.pull_request.head.ref, 'adz-') || contains(github.event.pull_request.head.ref, 'ADZ-') || contains(github.event.pull_request.head.ref, 'amb-') || contains(github.event.pull_request.head.ref, 'AMB-')
Expand All @@ -27,5 +42,5 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: |
This branch is work on a ticket in the NHS Digital APM JIRA Project. Here's a handy link to the ticket:
This branch is work on a ticket in an NHS Digital JIRA Project. Here's a handy link to the ticket:
# [${{ env.TICKET_NAME }}](https://nhsd-jira.digital.nhs.uk/browse/${{ env.TICKET_NAME }})
4 changes: 3 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ env:

jobs:
quality_checks:
uses: ./.github/workflows/quality_checks.yml
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.0.0
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
install_java: true

pr_title_format_check:
uses: ./.github/workflows/pr_title_check.yml
Expand Down
77 changes: 0 additions & 77 deletions .github/workflows/quality_checks.yml

This file was deleted.

4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ env:

jobs:
quality_checks:
uses: ./.github/workflows/quality_checks.yml
uses: NHSDigital/eps-workflow-quality-checks/.github/workflows/quality-checks.yml@v4.0.0
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
install_java: true

get_commit_id:
runs-on: ubuntu-latest
Expand Down
14 changes: 14 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
sonar.organization=nhsdigital
sonar.projectKey=NHSDigital_eps-FHIR-validator-lambda
sonar.sources=src/main
sonar.tests=src/test
sonar.java.binaries=target/classes
sonar.java.test.binaries=target/test-classes

sonar.host.url=https://sonarcloud.io

sonar.coverage.exclusions=src/test/**
sonar.cpd.exclusions=src/test/**

sonar.java.coveragePlugin=jacoco
sonar.coverage.jacoco.xmlReportPaths=target/site/jacoco/jacoco.xml
Loading