Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
d023165
Add Vault PKI service with enhancements and tests (#42)
nikan-negaresh-informed Feb 25, 2026
2234a54
[DPAV-2601] Management Node - Resolve CVEs (#43)
LukeJonesIS Mar 6, 2026
26bb5ea
[DPAV_2599] add missing docker attributes (#44)
JamesRuane-is Mar 9, 2026
6cca4a0
feat(dpav-2609): non root access for dev container and missing doc (#45)
KumailKamranIS Mar 9, 2026
6868b2d
[DPAV-2627] Organization Certificates (#46)
jsmith-informed Mar 11, 2026
8f79769
[DPAV-2591] replace version in gh workflows (#47)
JamesRuane-is Mar 11, 2026
e1df1b1
ci(dpav-2566): trigger release workflow from main and trivy check
JamesRuane-is Mar 18, 2026
b59d8be
[DPAV-2612] Protect certificate endpoints with role-based access and …
jsmith-informed Mar 18, 2026
e9ab7d8
[DPAV-2440] Certificate bootstrap package (#48)
jsmith-informed Mar 18, 2026
d73be7e
feat(DPAV-2440): Bootstrap endpoint changes and interceptor exemption…
jsmith-informed Mar 20, 2026
f68da72
feat(DPAV-2440): Set bootstrap event performed by to requester client…
jsmith-informed Mar 24, 2026
2e2f12d
feat(dpav-2563): add trivy vulnerability check to management-node pip…
ethiggins Mar 24, 2026
90b1044
feat(DPAV-2601): Resolve CVE-2026-22732 (#56)
jsmith-informed Mar 25, 2026
e8dc8c6
ci(dpav-2566): get image tag from branch name
JamesRuane-is Mar 26, 2026
47ea472
feat(dpav-2563): fix to vulnerability and update to trivy scan config…
ethiggins Mar 26, 2026
30749a5
feat(dpav-2608): update documentation and development setup guide (#53)
jsmith-informed Mar 26, 2026
7a8c1f3
docs: fix formatting issues with doc identifiers (#58)
KumailKamranIS Mar 26, 2026
abab8c9
chore: pre release 1.2.0 (#59)
KumailKamranIS Mar 26, 2026
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
93 changes: 93 additions & 0 deletions .github/workflows/auto-back-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# SPDX-License-Identifier: Apache-2.0
# © Crown Copyright 2026. This work has been developed by the National Digital Twin Programme and is legally attributed to the Department for Business and Trade (UK) as the governing entity.

# This workflow is triggered when a pull request is merged into the main branch and automatically merges the main branch back into develop to keep it up to date.
# If the merge fails (e.g., due to conflicts), a manual intervention is required. The workflow generates a Job summary of the merge attempt.
name: Auto Back-merge Main to Develop

on:
pull_request:
types:
- closed
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
merge-main-to-develop:

permissions: {}

name: Back-merge Main to Develop
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:

- name: Generate Sync Token
id: sync-token
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
with:
app-id: ${{ secrets.NDTP_REPOSITORY_WRITER_APP_CLIENT_ID }}
private-key: ${{ secrets.NDTP_REPOSITORY_WRITER_APP_PRIVATE_KEY }}
permission-contents: write
permission-workflows: write

- name: Merge main into develop and Generate Summary
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
with:
github-token: ${{ steps.sync-token.outputs.token }}
script: |
const prNumber = context.payload.pull_request.number;
const mergedBy = context.payload.sender.login;
const prUrl = context.payload.pull_request.html_url;

try {
// Attempt to merge main into develop, use the api to ensure the commit
// is gpg signed.
await github.rest.repos.merge({
owner: context.repo.owner,
repo: context.repo.repo,
base: 'develop',
head: 'main',
commit_message: `Merge branch 'main' into 'develop' (#${prNumber})`
});

let summaryText =
`## Sync Main to Develop ✅

Successfully triggered a merge of \`main\` into \`develop\` following the closure of PR #${prNumber}.

**Original PR Merged by**: @${mergedBy}

[View Original PR](${prUrl})
`;

await core.summary.addRaw(summaryText).write();
} catch (error) {
const finalErrorMessage = error.message || error;
// Write failure summary
summaryText =
`## Sync Main to Develop ❌

Failed to trigger a merge of \`main\` into \`develop\`! This is usually due to a merge conflict. Please resolve it manually by opening a PR from \`main\` to \`develop\`.

### Error Details:

\`\`\`text
${finalErrorMessage}
\`\`\`

**Original PR Merged by**: @${mergedBy}

[View Original PR](${prUrl})
`;

await core.summary.addRaw(summaryText).write();

// Fail the workflow step
core.setFailed(`Merge failed: ${finalErrorMessage}`);
}
16 changes: 13 additions & 3 deletions .github/workflows/docker-ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ jobs:
fi

- name: Checkout repo
uses: actions/checkout@v5
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1

- name: Login to ghcr.io
uses: docker/login-action@v3
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
Expand All @@ -66,7 +66,7 @@ jobs:
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}

- name: Get server and client jars
uses: actions/download-artifact@v5
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
pattern: management-node-*.jar
path: target
Expand All @@ -75,6 +75,16 @@ jobs:
- name: Build Server Image
run: docker build --no-cache --build-arg JAR_NAME="management-node-${{ inputs.jar_version }}" -t ghcr.io/${REPO}/management-node:staged -f "${{ github.workspace }}/docker/Dockerfile" --target ${{ inputs.docker_target }} .

- name: Run Trivy Scan on Server Docker Image
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
image-ref: "ghcr.io/${{ env.REPO }}/management-node:staged"
format: "table"
exit-code: "1"
ignore-unfixed: true
severity: "CRITICAL,HIGH"
continue-on-error: true

- name: Tag Server Image with tag(s) ${{ inputs.image_tag }}
run: |
./.github/actions/docker-tags.sh "ghcr.io/${REPO}/management-node" "${{ inputs.image_tag }}"
Expand Down
68 changes: 63 additions & 5 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ on:

env:
MAVEN_CLI_OPTS: "--batch-mode --no-transfer-progress"
DOCKER_TARGET: management-node
GITHUB_REPOSITORY: ${{ github.repository }}

jobs:
build:
Expand All @@ -41,12 +43,12 @@ jobs:
pull-requests: read
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
with:
# Full history is recommended for accurate Sonar analysis and PR decoration
fetch-depth: 0
- name: Set up JDK 21
uses: actions/setup-java@v5
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '21'
distribution: 'temurin'
Expand All @@ -69,9 +71,9 @@ jobs:
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up JDK 21
uses: actions/setup-java@v5
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '21'
distribution: 'temurin'
Expand All @@ -80,4 +82,60 @@ jobs:
- name: Lint
env:
GH_PACKAGES_PAT: ${{ secrets.GH_PACKAGES_PAT }}
run: ./mvnw $MAVEN_CLI_OPTS spotless:check
run: ./mvnw $MAVEN_CLI_OPTS spotless:check
security-scanning:
permissions:
contents: read
pull-requests: read
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '21'
distribution: 'temurin'
cache: maven
server-password: 'GH_PACKAGES_PAT'

- name: Get version
id: get_version
run: echo project_version=$(./mvnw $MAVEN_CLI_OPTS help:evaluate -Dexpression=project.version -q -DforceStdout) >> $GITHUB_OUTPUT

- name: Checkout repo
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1

- name: Login to ghcr.io
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Format repo name
run: echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}

- name: Get server jar
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
with:
pattern: management-node-*.jar
path: target
merge-multiple: true

- name: Build Server Image
run: docker build --no-cache --build-arg JAR_NAME="management-node-${{ steps.get_version.outputs.project_version}}" -t ghcr.io/${REPO}/management-node:staged -f "${{ github.workspace }}/docker/Dockerfile" --target ${{ env.DOCKER_TARGET }} .

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
image-ref: ghcr.io/${{ env.REPO }}/management-node:staged
format: table
exit-code: 1
ignore-unfixed: true
severity: "CRITICAL,HIGH"
trivyignores: .trivyignore
continue-on-error: false

- name: Clean up docker image
run: docker rmi ghcr.io/${REPO}/management-node:staged
29 changes: 23 additions & 6 deletions .github/workflows/oss-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ jobs:
steps:
- name: Fetch GitHub App token for target repo
id: target_token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
with:
app-id: ${{ secrets.OSPO_WORKFLOW_APP_ID }}
private-key: ${{ secrets.OSPO_WORKFLOW_PRIVATE_KEY }}
permission-contents: read

- name: Fetch GitHub App token for OSPO source repo (read-only)
id: ospo_token
uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1
uses: actions/create-github-app-token@f8d387b68d61c58ab83c6c016672934102569859 # v3.0.0
with:
app-id: ${{ secrets.OSPO_WORKFLOW_APP_ID }}
private-key: ${{ secrets.OSPO_WORKFLOW_PRIVATE_KEY }}
Expand Down Expand Up @@ -103,10 +103,27 @@ jobs:
core.info('Generated repository-metadata.json for policy context.');

- name: Install Conftest
env:
FALLBACK_VERSION: '0.67.1'
run: |
LATEST_VERSION=$(curl --proto "=https" -s "https://api.github.com/repos/open-policy-agent/conftest/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+')
curl --proto "=https" -L "https://github.com/open-policy-agent/conftest/releases/download/v${LATEST_VERSION}/conftest_${LATEST_VERSION}_Linux_x86_64.tar.gz" | tar -xz
sudo mv conftest /usr/local/bin/
set -euo pipefail

install_conftest() {
local version="$1"
local file_name="conftest_${version}_Linux_x86_64.deb"
curl --proto "=https" --fail -sSL "https://github.com/open-policy-agent/conftest/releases/download/v${version}/${file_name}" -o "${file_name}"
sudo dpkg -i "${file_name}"
rm -f "${file_name}"
}

LATEST_VERSION="$(curl --proto "=https" --fail -s "https://api.github.com/repos/open-policy-agent/conftest/releases/latest" | grep -Po '"tag_name": "v\K[0-9.]+' || true)"

if [[ -n "${LATEST_VERSION}" ]] && install_conftest "${LATEST_VERSION}"; then
echo "Installed latest Conftest version: ${LATEST_VERSION}"
else
echo "Failed to install latest Conftest. Falling back to version ${FALLBACK_VERSION}."
install_conftest "${FALLBACK_VERSION}"
fi

- name: Run Policy Checks
id: run_conftest
Expand Down Expand Up @@ -449,7 +466,7 @@ jobs:

- name: Upload OSS result artifacts
if: ${{ steps.summarise_results.outputs.hasResults == 'true' }}
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: oss-checks-${{ github.run_id }}
retention-days: 30
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/publish-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,18 @@ on:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
versioning:
if: |
github.event.pull_request.merged == true &&
(startsWith(github.head_ref, 'release/') || startsWith(github.head_ref, 'hotfix/'))
permissions:
contents: read

name: Extract Release Version
runs-on: ubuntu-latest
outputs:
Expand Down Expand Up @@ -62,6 +67,7 @@ jobs:
generate-sbom:
permissions:
contents: read

name: Generate SPDX SBOM
runs-on: ubuntu-latest
needs: [versioning]
Expand All @@ -85,14 +91,15 @@ jobs:
echo "$api_response" | jq '.sbom' > sbom.spdx.json

- name: Upload SBOM Artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: sbom
path: sbom.spdx.json

create-git-tag:
permissions:
contents: write

name: Create Git Tag
needs: [versioning, generate-sbom]
runs-on: ubuntu-latest
Expand All @@ -117,17 +124,18 @@ jobs:
create-git-release:
permissions:
contents: write

name: Create GitHub Release
needs: [versioning, generate-sbom, create-git-tag]
runs-on: ubuntu-latest
steps:
- name: Download SBOM Artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: sbom

- name: Create GitHub Release
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.6.1
with:
tag_name: "v${{ needs.versioning.outputs.version }}"
name: "Release v${{ needs.versioning.outputs.version }}"
Expand All @@ -136,4 +144,3 @@ jobs:
prerelease: false
files: |
sbom.spdx.json

6 changes: 3 additions & 3 deletions .github/workflows/publish-mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,20 @@ jobs:
contents: write
pages: write
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.merge_commit_sha }}
- name: Set up Python
uses: actions/setup-python@v6
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0
with:
python-version: 3.x
- name: Configure Git user for mike
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # 5.0.3
with:
key: mkdocs-material-${{ env.cache_id }}
path: ~/.cache
Expand Down
Loading
Loading