From 266102843f87b35c7f33c5c8dbb70a03df7554d5 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 09:32:42 +0100 Subject: [PATCH 01/43] added workflows and amended pom --- .github/workflows/cd.yaml | 54 +++++++++++++++++++++++++++++ .github/workflows/ci.yaml | 17 +++++++++ .github/workflows/maven-publish.yml | 38 -------------------- .github/workflows/maven.yml | 35 +++++++++++++++++++ .github/workflows/maven_build.yaml | 18 ++++++++++ .github/workflows/security.yaml | 38 ++++++++++++++++++++ pom.xml | 8 ++--- 7 files changed, 166 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/cd.yaml create mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/maven-publish.yml create mode 100644 .github/workflows/maven.yml create mode 100644 .github/workflows/maven_build.yaml create mode 100644 .github/workflows/security.yaml diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml new file mode 100644 index 0000000..a9ff7cd --- /dev/null +++ b/.github/workflows/cd.yaml @@ -0,0 +1,54 @@ +name: CD + +on: + push: + branches: + - main + +jobs: + release-please: + name: Release + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + outputs: + tag_name: ${{ steps.release.outputs.tag_name }} + release_created: ${{ steps.release.outputs.release_created }} + steps: + - uses: google-github-actions/release-please-action@v4 + id: release + with: + release-type: maven + + call-build-maven: + needs: release-please + name: build with Maven + uses: ./.github/workflows/maven_build.yaml + + publish: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + needs: + - release-please + - call-build-maven + steps: + - name: checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'corretto' + cache: 'maven' + + - name: Publish to GitHub Packages Apache Maven + if: ${{needs.release-please.outputs.release_created}} + run: mvn --batch-mode deploy + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..72604eb --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,17 @@ +name: CI + +on: + pull_request: + +jobs: + security: + name: Security + uses: ./.github/workflows/security.yaml + secrets: inherit + + build-maven: + name: build with Maven + uses: ./.github/workflows/maven_build.yaml + needs: security + + diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml deleted file mode 100644 index b735f8e..0000000 --- a/.github/workflows/maven-publish.yml +++ /dev/null @@ -1,38 +0,0 @@ -# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created -# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path - -name: Maven Package - -on: - push: - branches: - - gitHubPackages - -jobs: - build: - - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - server-username: GITHUB_USER_REF # env variable name for username - server-password: GITHUB_TOKEN_REF # env variable name for GitHub Personal Access Token - - - name: Build with Maven - run: mvn -B -Pgithub package --file pom.xml - - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml - env: - GITHUB_USER_REF: ${{ secrets.GH_PACKAGE_REPO_USERNAME }} - GITHUB_TOKEN_REF: ${{ secrets.GH_PACKAGE_REPO_PASSWORD }} diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..e669f16 --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,35 @@ +# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created +# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path + +name: Maven Package + +on: + push: + branches: + - master + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + server-id: github # Value of the distributionManagement/repository/id field of the pom.xml + settings-path: ${{ github.workspace }} # location for the settings.xml file + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages Apache Maven + run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/maven_build.yaml b/.github/workflows/maven_build.yaml new file mode 100644 index 0000000..7d01df2 --- /dev/null +++ b/.github/workflows/maven_build.yaml @@ -0,0 +1,18 @@ +name: Maven Build + +on: + workflow_call: + +permissions: + contents: read + +jobs: + build: + name: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: mvn -B -P github package + + \ No newline at end of file diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml new file mode 100644 index 0000000..49861eb --- /dev/null +++ b/.github/workflows/security.yaml @@ -0,0 +1,38 @@ +name: Security Scan + +on: + workflow_call: + inputs: + severity-threshold: + description: "Severity threshold" + required: false + default: "high" + type: string + secrets: + SNYK_TOKEN: + description: "Snyk token" + required: true + schedule: + # Weekly on Monday at 00:00 UTC + - cron: 0 0 * * 1 + +permissions: + contents: read + packages: read + +jobs: + scan: + name: scan + runs-on: ubuntu-latest + steps: + + - uses: actions/checkout@v4 + - uses: snyk/actions/setup@master + - uses: actions/setup-java@v4 + with: + distribution: "corretto" + java-version: "11" + cache: maven + - run: snyk test --severity-threshold=${{ inputs.severity-threshold || 'high' }} -- -P github + env: + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 8a5f4be..fce99a9 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ 0.9.11 2.22.0 2.22.0 + https://maven.pkg.github.com/dvsa/vol-accessibility-lib @@ -90,12 +91,11 @@ compile - - - maven-releases - ${nexus.releases} + github + GitHub dvsa Apache Maven Packages + ${github.url} \ No newline at end of file From 78a0aab600d2a46a7b635198783d86835d1a020c Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 10:05:15 +0100 Subject: [PATCH 02/43] amended pom for active support and added to security action --- .github/workflows/security.yaml | 6 +++++- pom.xml | 28 +++++++++++++++++++++------- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 49861eb..483a3d0 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -32,7 +32,11 @@ jobs: with: distribution: "corretto" java-version: "11" - cache: maven + cache: maven + - uses: whelk-io/maven-settings-xml-action@v22 + with: + servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' + - run: snyk test --severity-threshold=${{ inputs.severity-threshold || 'high' }} -- -P github env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index fce99a9..c59017c 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ https://nexus.olcs.dev-dvsacloud.uk/repository/maven-releases UTF-8 3.8.1 - 2.0.1.7 + 2.0.1.10 4.8.0 ${rules} @@ -24,12 +24,26 @@ https://maven.pkg.github.com/dvsa/vol-accessibility-lib - - - maven-releases - ${nexus.releases} - - + + + github + + + central + https://repo1.maven.org/maven2 + true + true + + + github-vol-active-support + GitHub dvsa Apache Maven Packages + https://maven.pkg.github.com/dvsa/vol-active-support + true + true + + + + From fb2a0b1adf603c3c927abb94ffb9c5ad167b767c Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 9 May 2024 14:11:44 +0100 Subject: [PATCH 03/43] feat: snyk --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c59017c..7f8283d 100644 --- a/pom.xml +++ b/pom.xml @@ -89,7 +89,7 @@ org.seleniumhq.selenium - selenenium-java + selenium-java From ecbe0b87e823375d973723a544bdf17ba26f21e6 Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 9 May 2024 14:25:20 +0100 Subject: [PATCH 04/43] feat: snyk --- .snyk | 15 ++++++++ pom.xml | 116 ++++++++++++++++++++------------------------------------ 2 files changed, 57 insertions(+), 74 deletions(-) create mode 100644 .snyk diff --git a/.snyk b/.snyk new file mode 100644 index 0000000..300ea15 --- /dev/null +++ b/.snyk @@ -0,0 +1,15 @@ +# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. +version: v1.25.0 +# ignores vulnerabilities until expiry date; change duration by modifying expiry date +ignore: + SNYK-JAVA-DOM4J-174153: + - '*': + reason: None Given + expires: 2024-06-08T13:15:21.624Z + created: 2024-05-09T13:15:21.627Z + SNYK-JAVA-DOM4J-2812795: + - '*': + reason: None Given + expires: 2024-06-08T13:16:12.796Z + created: 2024-05-09T13:16:12.804Z +patch: {} diff --git a/pom.xml b/pom.xml index 7f8283d..d9aada6 100644 --- a/pom.xml +++ b/pom.xml @@ -22,94 +22,62 @@ 2.22.0 2.22.0 https://maven.pkg.github.com/dvsa/vol-accessibility-lib + 1.9.2 + 3.2.2 + 1.6.1 + 1.10.0 + 1.26.0 + 20180130 + 42.3.3 + 1.31 + 1.0.3 - - - github - - - central - https://repo1.maven.org/maven2 - true - true - - - github-vol-active-support - GitHub dvsa Apache Maven Packages - https://maven.pkg.github.com/dvsa/vol-active-support - true - true - - - - - - - - - org.springframework.build - aws-maven - 5.0.0.RELEASE - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - 11 - - - - - - org.apache.logging.log4j - log4j-api - ${slf4j.version} + commons-beanutils + commons-beanutils + ${commons-beanutils.version} + + + commons-collections + commons-collections + ${commons-collections.version} + + + dom4j + dom4j + ${dom4j.version} + + + org.apache.commons + commons-text + ${org.apache.commons.commons-text.version} - org.apache.logging.log4j - log4j-core - ${slf4j-log4j12.version} + org.apache.commons + commons-compress + ${org.apache.commons.commons-compress.version} - org.dvsa.testing.lib - active-support - ${active-support.version} + org.json + json + ${org.json.version} - com.deque.html.axe-core - selenium - ${axe-selenium-version} - test - - - org.seleniumhq.selenium - selenium-java - - + org.postgresql + postgresql + ${org.postgresql.version} - com.github.spullara.mustache.java - compiler - ${mustache.version} + org.yaml + snakeyaml + ${org.yaml.snakeyaml.version} - com.deque.html.axe-core - selenium - ${axe-selenium-version} - compile + software.amazon.ion + ion-java + ${software.amazon.ion.version} - - - github - GitHub dvsa Apache Maven Packages - ${github.url} - - \ No newline at end of file From f697056a07f18f78c8d2b4a1a0568d19abf432b9 Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 9 May 2024 14:31:27 +0100 Subject: [PATCH 05/43] feat: snyk --- .snyk | 5 +++++ pom.xml | 5 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.snyk b/.snyk index 300ea15..6ddb787 100644 --- a/.snyk +++ b/.snyk @@ -12,4 +12,9 @@ ignore: reason: None Given expires: 2024-06-08T13:16:12.796Z created: 2024-05-09T13:16:12.804Z + SNYK-JAVA-SOFTWAREAMAZONION-6153869: + - '*': + reason: None Given + expires: 2024-06-08T13:27:49.964Z + created: 2024-05-09T13:27:49.971Z patch: {} diff --git a/pom.xml b/pom.xml index d9aada6..8e5e6b0 100644 --- a/pom.xml +++ b/pom.xml @@ -22,15 +22,16 @@ 2.22.0 2.22.0 https://maven.pkg.github.com/dvsa/vol-accessibility-lib - 1.9.2 + 1.9.4 3.2.2 1.6.1 1.10.0 1.26.0 20180130 - 42.3.3 + 42.3.9 1.31 1.0.3 + 20231013 From e3eca2a785b4c03c5cc737b948a46def793cbb5c Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 16:02:36 +0100 Subject: [PATCH 06/43] remove maven file --- .github/workflows/maven.yml | 35 ----------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .github/workflows/maven.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml deleted file mode 100644 index e669f16..0000000 --- a/.github/workflows/maven.yml +++ /dev/null @@ -1,35 +0,0 @@ -# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created -# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path - -name: Maven Package - -on: - push: - branches: - - master - -jobs: - build: - - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Build with Maven - run: mvn -B package --file pom.xml - - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml - env: - GITHUB_TOKEN: ${{ github.token }} From 048632a05026c946175f9c05f895b26c3711046a Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 16:07:15 +0100 Subject: [PATCH 07/43] added snyk ignore --- .snyk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.snyk b/.snyk index 6ddb787..0cad33d 100644 --- a/.snyk +++ b/.snyk @@ -17,4 +17,9 @@ ignore: reason: None Given expires: 2024-06-08T13:27:49.964Z created: 2024-05-09T13:27:49.971Z + SNYK-JAVA-DOM4J-2812975: + - '*': + reason: no fix + expires: 2024-06-08T15:06:55.574Z + created: 2024-05-09T15:06:55.579Z patch: {} From 74c5481c85285d717c2cf207d091f59cf9b26a78 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 16:12:56 +0100 Subject: [PATCH 08/43] amending the pom again --- pom.xml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/pom.xml b/pom.xml index 8e5e6b0..0b9e5ac 100644 --- a/pom.xml +++ b/pom.xml @@ -34,6 +34,27 @@ 20231013 + + + github + + + central + https://repo1.maven.org/maven2 + true + true + + + github-vol-active-support + GitHub dvsa Apache Maven Packages + https://maven.pkg.github.com/dvsa/vol-active-support + true + true + + + + + commons-beanutils @@ -81,4 +102,12 @@ ${software.amazon.ion.version} + + + + github + GitHub dvsa Apache Maven Packages + https://maven.pkg.github.com/dvsa/vol-accessibility-lib + + \ No newline at end of file From 442af2c7693dacea1c78f50c4b4b4687bce17ffc Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 9 May 2024 16:40:17 +0100 Subject: [PATCH 09/43] feat:pom changes --- pom.xml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0b9e5ac..3f84a63 100644 --- a/pom.xml +++ b/pom.xml @@ -12,8 +12,8 @@ https://nexus.olcs.dev-dvsacloud.uk/repository/maven-releases UTF-8 3.8.1 - 2.0.1.10 - 4.8.0 + 2.2.0 + 3.0 ${rules} @@ -101,8 +101,24 @@ ion-java ${software.amazon.ion.version} + + com.github.spullara.mustache.java + compiler + ${mustache.version} + + + org.apache.logging.log4j + log4j-core + ${slf4j-log4j12.version} + + + com.deque.html.axe-core + selenium + 4.6.0 + + github From b4c300ea36a522ef6d90fbc2332c063d62020b1c Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 9 May 2024 16:43:06 +0100 Subject: [PATCH 10/43] feat: axe core --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3f84a63..2b14e14 100644 --- a/pom.xml +++ b/pom.xml @@ -114,7 +114,7 @@ com.deque.html.axe-core selenium - 4.6.0 + 4.9.0 From 1d4160afb14470705eda69affb6637588b2de2ec Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 9 May 2024 16:46:48 +0100 Subject: [PATCH 11/43] feat:snyk ignore --- .snyk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.snyk b/.snyk index 0cad33d..2a91893 100644 --- a/.snyk +++ b/.snyk @@ -22,4 +22,14 @@ ignore: reason: no fix expires: 2024-06-08T15:06:55.574Z created: 2024-05-09T15:06:55.579Z + SNYK-JAVA-ORGSELENIUMHQSELENIUM-6062318: + - '*': + reason: None Given + expires: 2024-06-08T15:45:53.270Z + created: 2024-05-09T15:45:53.284Z + SNYK-JAVA-ORGBOUNCYCASTLE-6612984: + - '*': + reason: None Given + expires: 2024-06-08T15:46:16.314Z + created: 2024-05-09T15:46:16.322Z patch: {} From 8549256f9fbea6695d12e0ec1b42c29a94a6a3c9 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 17:14:50 +0100 Subject: [PATCH 12/43] amended pom --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 2b14e14..070abb4 100644 --- a/pom.xml +++ b/pom.xml @@ -118,7 +118,6 @@ - github @@ -126,4 +125,4 @@ https://maven.pkg.github.com/dvsa/vol-accessibility-lib - \ No newline at end of file + From c44e6ee668ddaad23bf02b7f37665bf540e99beb Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 9 May 2024 17:18:40 +0100 Subject: [PATCH 13/43] feat:compiler --- pom.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 2b14e14..a33edd7 100644 --- a/pom.xml +++ b/pom.xml @@ -11,7 +11,8 @@ https://nexus.olcs.dev-dvsacloud.uk/repository/maven-releases UTF-8 - 3.8.1 + 1.6 + 1.6 2.2.0 3.0 From a8b0ae0f16605cf9d062c8b38575e95d44a17ac3 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 18:21:04 +0100 Subject: [PATCH 14/43] added in dependancy --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index d447ecb..ca7d01f 100644 --- a/pom.xml +++ b/pom.xml @@ -57,6 +57,11 @@ + + org.dvsa.testing.lib + active-support + 2.2.0 + commons-beanutils commons-beanutils From 4863c9acb1fe45d6de344809ddae614d1e2594b0 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 18:24:20 +0100 Subject: [PATCH 15/43] snyk ignore --- .snyk | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.snyk b/.snyk index 2a91893..930d052 100644 --- a/.snyk +++ b/.snyk @@ -20,8 +20,8 @@ ignore: SNYK-JAVA-DOM4J-2812975: - '*': reason: no fix - expires: 2024-06-08T15:06:55.574Z - created: 2024-05-09T15:06:55.579Z + expires: 2024-06-08T17:23:14.009Z + created: 2024-05-09T17:23:14.014Z SNYK-JAVA-ORGSELENIUMHQSELENIUM-6062318: - '*': reason: None Given @@ -32,4 +32,14 @@ ignore: reason: None Given expires: 2024-06-08T15:46:16.314Z created: 2024-05-09T15:46:16.322Z + SNYK-JAVA-ORGYAML-6056527: + - '*': + reason: no fix + expires: 2024-06-08T17:23:28.159Z + created: 2024-05-09T17:23:28.165Z + SNYK-JAVA-ORGYAML-2806360: + - '*': + reason: no fix + expires: 2024-06-08T17:24:05.946Z + created: 2024-05-09T17:24:05.953Z patch: {} From 59236a5541b0cf2c230544930d703361bbda4992 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 18:27:34 +0100 Subject: [PATCH 16/43] added settings --- .github/workflows/maven_build.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven_build.yaml b/.github/workflows/maven_build.yaml index 7d01df2..87c8389 100644 --- a/.github/workflows/maven_build.yaml +++ b/.github/workflows/maven_build.yaml @@ -12,7 +12,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - + - uses: whelk-io/maven-settings-xml-action@v22 + with: + servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' + - run: mvn -B -P github package \ No newline at end of file From f516060090947dbe92b672e6d94b8bb7f984581f Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 18:31:15 +0100 Subject: [PATCH 17/43] added settings --- .github/workflows/maven_build.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/maven_build.yaml b/.github/workflows/maven_build.yaml index 87c8389..9869a3a 100644 --- a/.github/workflows/maven_build.yaml +++ b/.github/workflows/maven_build.yaml @@ -12,10 +12,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: "corretto" + java-version: "11" + cache: maven - uses: whelk-io/maven-settings-xml-action@v22 with: servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - - run: mvn -B -P github package \ No newline at end of file From 8adf9f1f4f25e3aedd9820129014cb8abe3a06b5 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 20:33:07 +0100 Subject: [PATCH 18/43] downgrade to java 8 --- .github/workflows/maven_build.yaml | 2 +- .github/workflows/security.yaml | 2 +- pom.xml | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven_build.yaml b/.github/workflows/maven_build.yaml index 9869a3a..5992efa 100644 --- a/.github/workflows/maven_build.yaml +++ b/.github/workflows/maven_build.yaml @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: "corretto" - java-version: "11" + java-version: "8" cache: maven - uses: whelk-io/maven-settings-xml-action@v22 with: diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 483a3d0..af8fd00 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: "corretto" - java-version: "11" + java-version: "8" cache: maven - uses: whelk-io/maven-settings-xml-action@v22 with: diff --git a/pom.xml b/pom.xml index ca7d01f..478383d 100644 --- a/pom.xml +++ b/pom.xml @@ -34,6 +34,18 @@ 1.0.3 20231013 + + + + org.apache.maven.plugins + maven-compiler-plugin + + 7 + 7 + + + + From fe4c7cd2274253228676a084e1006b286c818cb2 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 20:47:01 +0100 Subject: [PATCH 19/43] regrade to 11 --- .github/workflows/maven_build.yaml | 2 +- .github/workflows/security.yaml | 2 +- pom.xml | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven_build.yaml b/.github/workflows/maven_build.yaml index 5992efa..9869a3a 100644 --- a/.github/workflows/maven_build.yaml +++ b/.github/workflows/maven_build.yaml @@ -15,7 +15,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: "corretto" - java-version: "8" + java-version: "11" cache: maven - uses: whelk-io/maven-settings-xml-action@v22 with: diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index af8fd00..483a3d0 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -31,7 +31,7 @@ jobs: - uses: actions/setup-java@v4 with: distribution: "corretto" - java-version: "8" + java-version: "11" cache: maven - uses: whelk-io/maven-settings-xml-action@v22 with: diff --git a/pom.xml b/pom.xml index 478383d..0fbdeb1 100644 --- a/pom.xml +++ b/pom.xml @@ -33,6 +33,7 @@ 1.31 1.0.3 20231013 + 11 From e08905f637f3d3cfe2d8908d2991a0828ede79b9 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 20:53:57 +0100 Subject: [PATCH 20/43] compiler to 11 --- pom.xml | 4 ++-- src/main/java/scanner/AXEScanner.java | 1 - src/main/java/scanner/ReportGenerator.java | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 0fbdeb1..755ca66 100644 --- a/pom.xml +++ b/pom.xml @@ -11,8 +11,8 @@ https://nexus.olcs.dev-dvsacloud.uk/repository/maven-releases UTF-8 - 1.6 - 1.6 + 1.11 + 1.11 2.2.0 3.0 diff --git a/src/main/java/scanner/AXEScanner.java b/src/main/java/scanner/AXEScanner.java index 8722789..0cab74d 100644 --- a/src/main/java/scanner/AXEScanner.java +++ b/src/main/java/scanner/AXEScanner.java @@ -4,7 +4,6 @@ import activesupport.driver.Browser; import com.deque.html.axecore.args.AxeRuleOptions; import com.deque.html.axecore.args.AxeRunOptions; -import com.deque.html.axecore.args.AxeRunOptions; import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.Rule; import com.deque.html.axecore.selenium.AxeBuilder; diff --git a/src/main/java/scanner/ReportGenerator.java b/src/main/java/scanner/ReportGenerator.java index 422db5d..6a1dc76 100644 --- a/src/main/java/scanner/ReportGenerator.java +++ b/src/main/java/scanner/ReportGenerator.java @@ -231,7 +231,8 @@ private static String readLinesAsInputStream(InputStream inputStream) throws IOE private static String readLines(String filePath) { StringBuilder contentBuilder = new StringBuilder(); try (Stream stream = Files.lines(Paths.get(filePath), StandardCharsets.UTF_8)) { - stream.forEach(s -> contentBuilder.append(s).append("\n")); + final StringBuilder finalContentBuilder = contentBuilder; + stream.forEach(s -> finalContentBuilder.append(s).append("\n")); } catch (IOException e) { e.printStackTrace(); } From d0283e4e396e46fcd571f29c726b1fed62de529e Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Thu, 9 May 2024 21:07:33 +0100 Subject: [PATCH 21/43] changed compiler version --- pom.xml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 755ca66..d3f6e0e 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,6 @@ 2.9 - https://nexus.olcs.dev-dvsacloud.uk/repository/maven-releases UTF-8 1.11 1.11 @@ -40,9 +39,9 @@ org.apache.maven.plugins maven-compiler-plugin + 3.13.0 - 7 - 7 + 11 @@ -55,15 +54,23 @@ central https://repo1.maven.org/maven2 - true - true + + true + + + true + github-vol-active-support GitHub dvsa Apache Maven Packages https://maven.pkg.github.com/dvsa/vol-active-support - true - true + + true + + + true + @@ -74,7 +81,7 @@ org.dvsa.testing.lib active-support 2.2.0 - + commons-beanutils commons-beanutils @@ -137,6 +144,7 @@ + github @@ -144,4 +152,5 @@ https://maven.pkg.github.com/dvsa/vol-accessibility-lib + From cf93099887c0e5ecf143d30ddab4f51b47ff303d Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Sat, 11 May 2024 10:01:32 +0100 Subject: [PATCH 22/43] amended workflows --- .github/workflows/cd.yaml | 13 +++++-------- .github/workflows/ci.yaml | 4 +++- .github/workflows/maven.yaml | 25 +++++++++++++++++++++++++ .github/workflows/maven_build.yaml | 25 ------------------------- .github/workflows/security.yaml | 4 ++-- 5 files changed, 35 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/maven.yaml delete mode 100644 .github/workflows/maven_build.yaml diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index a9ff7cd..3cca501 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -20,20 +20,16 @@ jobs: id: release with: release-type: maven - - call-build-maven: - needs: release-please - name: build with Maven - uses: ./.github/workflows/maven_build.yaml + publish: + if: ${{needs.release-please.outputs.release_created}} runs-on: ubuntu-latest permissions: contents: read packages: write needs: - release-please - - call-build-maven steps: - name: checkout code uses: actions/checkout@v4 @@ -46,8 +42,9 @@ jobs: cache: 'maven' - name: Publish to GitHub Packages Apache Maven - if: ${{needs.release-please.outputs.release_created}} - run: mvn --batch-mode deploy + uses: ./.github/workflows/maven.yaml + with: + maven-goal: deploy env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 72604eb..1eac41b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,7 +11,9 @@ jobs: build-maven: name: build with Maven - uses: ./.github/workflows/maven_build.yaml + uses: ./.github/workflows/maven.yaml + with: + maven-goal: package needs: security diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml new file mode 100644 index 0000000..87f4ff6 --- /dev/null +++ b/.github/workflows/maven.yaml @@ -0,0 +1,25 @@ +name: Maven + +on: + workflow_call: + inputs: + maven-goal: + description: 'Maven goal to run' + required: true + default: 'package' + type: string + +permissions: + contents: read + + +jobs: + build: + name: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - run: mvn -B -P github ${{ inputs.maven-goal}} + + \ No newline at end of file diff --git a/.github/workflows/maven_build.yaml b/.github/workflows/maven_build.yaml deleted file mode 100644 index 9869a3a..0000000 --- a/.github/workflows/maven_build.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Maven Build - -on: - workflow_call: - -permissions: - contents: read - -jobs: - build: - name: build - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - distribution: "corretto" - java-version: "11" - cache: maven - - uses: whelk-io/maven-settings-xml-action@v22 - with: - servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - - run: mvn -B -P github package - - \ No newline at end of file diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 483a3d0..9a4e077 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -32,11 +32,11 @@ jobs: with: distribution: "corretto" java-version: "11" - cache: maven + cache: maven - uses: whelk-io/maven-settings-xml-action@v22 with: servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - + - run: snyk test --severity-threshold=${{ inputs.severity-threshold || 'high' }} -- -P github env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} \ No newline at end of file From 93a101c798fb0b439ccc53269d72cac1187e35e6 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Sat, 11 May 2024 10:16:54 +0100 Subject: [PATCH 23/43] amended ci --- .github/workflows/ci.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1eac41b..834330d 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,9 +10,12 @@ jobs: secrets: inherit build-maven: - name: build with Maven - uses: ./.github/workflows/maven.yaml - with: + - uses: whelk-io/maven-settings-xml-action@v22 + with: + servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' + + - uses: ./.github/workflows/maven.yaml + with: maven-goal: package needs: security From 96e08e452e0d318c1f6acccb31a384eea36b1564 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Sat, 11 May 2024 10:24:23 +0100 Subject: [PATCH 24/43] amended ci --- .github/workflows/ci.yaml | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 834330d..be00ceb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -4,19 +4,29 @@ on: pull_request: jobs: + security: name: Security uses: ./.github/workflows/security.yaml secrets: inherit - build-maven: - - uses: whelk-io/maven-settings-xml-action@v22 - with: - servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - - - uses: ./.github/workflows/maven.yaml - with: - maven-goal: package - needs: security + build-maven: + runs-on: ubuntu-latest + needs: security + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + distribution: "corretto" + java-version: "11" + cache: maven + - uses: whelk-io/maven-settings-xml-action@v22 + with: + servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' + + - uses: ./.github/workflows/maven.yaml + with: + maven-goal: package + From c22404f7deadbb7a47de0431da8b5e3d85df2b6b Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Sat, 11 May 2024 10:37:39 +0100 Subject: [PATCH 25/43] fix ci maven --- .github/workflows/maven.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 87f4ff6..420ad63 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -12,14 +12,11 @@ on: permissions: contents: read - jobs: build: name: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - run: mvn -B -P github ${{ inputs.maven-goal}} - \ No newline at end of file From 950ed6571e46993efe093ff84cc174b50826ea0e Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Sat, 11 May 2024 10:45:16 +0100 Subject: [PATCH 26/43] fix ci maven path --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index be00ceb..4cda97e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,7 +24,7 @@ jobs: with: servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - - uses: ./.github/workflows/maven.yaml + - uses: ../../.github/workflows/maven.yaml with: maven-goal: package From af8086906825fc5af0de329c0f06bbe725e15297 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Sat, 11 May 2024 10:47:32 +0100 Subject: [PATCH 27/43] fix ci maven path --- .github/workflows/ci.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4cda97e..2753a8f 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,7 +14,6 @@ jobs: runs-on: ubuntu-latest needs: security steps: - - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: "corretto" @@ -23,8 +22,8 @@ jobs: - uses: whelk-io/maven-settings-xml-action@v22 with: servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - - - uses: ../../.github/workflows/maven.yaml + - uses: actions/checkout@v4 + - uses: ./.github/workflows/maven.yaml with: maven-goal: package From 69f255fd0b8a413e2cfb7a738e7e53f0c4aed430 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Sat, 11 May 2024 10:49:54 +0100 Subject: [PATCH 28/43] fix ci maven path --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2753a8f..c8fcaa4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest needs: security steps: + - uses: actions/checkout@v4 - uses: actions/setup-java@v4 with: distribution: "corretto" From 3567dd3014fb514ad3d0a12eecc23f2a5288dbad Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Sat, 11 May 2024 11:01:06 +0100 Subject: [PATCH 29/43] fix ci maven path --- .github/workflows/ci.yaml | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c8fcaa4..ae08ee0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -14,19 +14,23 @@ jobs: runs-on: ubuntu-latest needs: security steps: - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up JDK 11 + uses: actions/setup-java@v4 with: distribution: "corretto" java-version: "11" cache: maven - - uses: whelk-io/maven-settings-xml-action@v22 + - name: Maven settings + uses: whelk-io/maven-settings-xml-action@v22 with: servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - - uses: actions/checkout@v4 - - uses: ./.github/workflows/maven.yaml + - name : Maven build + uses: ./.github/workflows/maven.yaml with: - maven-goal: package + maven-goal: package + From 0bf180887b430d094cdba75faa237a68a6c8863f Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Mon, 13 May 2024 09:07:12 +0100 Subject: [PATCH 30/43] another approach --- .github/workflows/cd.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 3cca501..a8d7deb 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -31,16 +31,13 @@ jobs: needs: - release-please steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: Set up JDK 11 - uses: actions/setup-java@v4 + + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 with: java-version: '11' distribution: 'corretto' - cache: 'maven' - + cache: 'maven' - name: Publish to GitHub Packages Apache Maven uses: ./.github/workflows/maven.yaml with: From c33e8ffcfb6afd4bbc9cd862ae82836d2db61d40 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Mon, 13 May 2024 10:21:45 +0100 Subject: [PATCH 31/43] amended checkout in custom action --- .github/workflows/maven.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 420ad63..2aec1a6 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -18,5 +18,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + path: ${{ github.repository }} + fetch-depth: 0 - run: mvn -B -P github ${{ inputs.maven-goal}} \ No newline at end of file From a87167008cfba71d9f8fbadba335fcb7ba8d88e2 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Mon, 13 May 2024 10:43:29 +0100 Subject: [PATCH 32/43] same as uri constructor --- .github/workflows/cd.yaml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index a8d7deb..78f8f1e 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -31,18 +31,21 @@ jobs: needs: - release-please steps: - - - uses: actions/checkout@v4 - - uses: actions/setup-java@v4 - with: - java-version: '11' - distribution: 'corretto' - cache: 'maven' - - name: Publish to GitHub Packages Apache Maven - uses: ./.github/workflows/maven.yaml - with: - maven-goal: deploy - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 11 + uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'corretto' + cache: 'maven' + + - name: Publish to GitHub Packages Apache Maven + uses: ./.github/workflows/maven.yaml + with: + maven-goal: deploy + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file From 314b8bae2cd9b1c49a76b365294aee9fef1df534 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Mon, 13 May 2024 16:03:07 +0100 Subject: [PATCH 33/43] amended back to job --- .github/workflows/cd.yaml | 15 +++++++++------ .github/workflows/ci.yaml | 25 +++++-------------------- .github/workflows/maven.yaml | 4 ++++ 3 files changed, 18 insertions(+), 26 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 78f8f1e..6dd4764 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -41,11 +41,14 @@ jobs: distribution: 'corretto' cache: 'maven' - - name: Publish to GitHub Packages Apache Maven - uses: ./.github/workflows/maven.yaml - with: - maven-goal: deploy - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + push: + if: ${{needs.release-please.outputs.release_created}} + name: Publish to GitHub Packages Apache Maven + uses: ./.github/workflows/maven.yaml + with: + maven-goal: deploy + needs: release-please + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index ae08ee0..9383f98 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -11,26 +11,11 @@ jobs: secrets: inherit build-maven: - runs-on: ubuntu-latest - needs: security - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Set up JDK 11 - uses: actions/setup-java@v4 - with: - distribution: "corretto" - java-version: "11" - cache: maven - - name: Maven settings - uses: whelk-io/maven-settings-xml-action@v22 - with: - servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - - name : Maven build - uses: ./.github/workflows/maven.yaml - with: - maven-goal: package - + name: Build Maven + uses: ./.github/workflows/maven.yaml + with: + maven-goal: package + diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index 2aec1a6..a022d5d 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -21,5 +21,9 @@ jobs: with: path: ${{ github.repository }} fetch-depth: 0 + - uses: whelk-io/maven-settings-xml-action@v22 + with: + servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' + - run: mvn -B -P github ${{ inputs.maven-goal}} \ No newline at end of file From 238c221b9f897edc9de43ddc6263f265f51b53c4 Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Mon, 13 May 2024 16:04:39 +0100 Subject: [PATCH 34/43] amended back to job --- .github/workflows/maven.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index a022d5d..d1dbf31 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -18,9 +18,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - path: ${{ github.repository }} - fetch-depth: 0 - uses: whelk-io/maven-settings-xml-action@v22 with: servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' From 49aef662c39aff5f9b84a2cd90da2659af81942c Mon Sep 17 00:00:00 2001 From: Shaun Hare Date: Mon, 13 May 2024 16:06:05 +0100 Subject: [PATCH 35/43] amended back to job --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9383f98..6c243d3 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -15,6 +15,7 @@ jobs: uses: ./.github/workflows/maven.yaml with: maven-goal: package + needs: security From c2895a79937b8aabb81c6b5566a2e13c9db3ceb0 Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 16 May 2024 10:40:44 +0100 Subject: [PATCH 36/43] chore : update readme --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c8903b5..cddb3d7 100644 --- a/README.md +++ b/README.md @@ -10,4 +10,15 @@ that consumes this library. # Rules This library uses AXE-CORE to scan for accessibility violations. The full rules that the scan covers -can be found on the following link https://dequeuniversity.com/rules/axe/3.2 \ No newline at end of file +can be found on the following link https://dequeuniversity.com/rules/axe/3.2 + +## Installation +Add the following Maven dependency to your project's `pom.xml` file: +```xml + + org.dvsa.testing.framework + accessibility-library + [insert latest version of package] + +``` + From 78af345f73e0786233f81a380caf35aa8f2d68bd Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 16 May 2024 10:47:30 +0100 Subject: [PATCH 37/43] chore : amend pom --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d3f6e0e..ec4992f 100644 --- a/pom.xml +++ b/pom.xml @@ -62,9 +62,9 @@ - github-vol-active-support + dvsa-github-packages GitHub dvsa Apache Maven Packages - https://maven.pkg.github.com/dvsa/vol-active-support + https://maven.pkg.github.com/dvsa/* true From 0e25ed3794d6c7bb59188331861b4cffd2d91c78 Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 16 May 2024 10:51:27 +0100 Subject: [PATCH 38/43] chore : amend security.yamal as per comments --- .github/workflows/security.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/security.yaml b/.github/workflows/security.yaml index 9a4e077..84e29a6 100644 --- a/.github/workflows/security.yaml +++ b/.github/workflows/security.yaml @@ -35,8 +35,8 @@ jobs: cache: maven - uses: whelk-io/maven-settings-xml-action@v22 with: - servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' + servers: '[{ "id":"dvsa-github-packages", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - run: snyk test --severity-threshold=${{ inputs.severity-threshold || 'high' }} -- -P github env: - SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} \ No newline at end of file + SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} From 65045ae4243aed3fbdb7bccd0661d1c15fee9ee2 Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 16 May 2024 10:58:10 +0100 Subject: [PATCH 39/43] chore: copy profile directly from api calls --- pom.xml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/pom.xml b/pom.xml index ec4992f..2e3649d 100644 --- a/pom.xml +++ b/pom.xml @@ -47,30 +47,22 @@ - + github central https://repo1.maven.org/maven2 - - true - - - true - + true + true dvsa-github-packages GitHub dvsa Apache Maven Packages https://maven.pkg.github.com/dvsa/* - - true - - - true - + true + true From e734b36981d06b039a9c91c78960dc0a6160295d Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 16 May 2024 11:16:58 +0100 Subject: [PATCH 40/43] chore: amend yamal --- .github/workflows/maven.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yaml b/.github/workflows/maven.yaml index d1dbf31..3213bb9 100644 --- a/.github/workflows/maven.yaml +++ b/.github/workflows/maven.yaml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - uses: whelk-io/maven-settings-xml-action@v22 with: - servers: '[{ "id":"github-vol-active-support", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' + servers: '[{ "id":"dvsa-github-packages", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]' - run: mvn -B -P github ${{ inputs.maven-goal}} - \ No newline at end of file + From b5d01dc38b3bb4142e87c5f7b59bfcf10e123bf7 Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Thu, 16 May 2024 14:32:55 +0100 Subject: [PATCH 41/43] fix:revert scanner changes --- src/main/java/scanner/AXEScanner.java | 1 + src/main/java/scanner/ReportGenerator.java | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/scanner/AXEScanner.java b/src/main/java/scanner/AXEScanner.java index 0cab74d..8722789 100644 --- a/src/main/java/scanner/AXEScanner.java +++ b/src/main/java/scanner/AXEScanner.java @@ -4,6 +4,7 @@ import activesupport.driver.Browser; import com.deque.html.axecore.args.AxeRuleOptions; import com.deque.html.axecore.args.AxeRunOptions; +import com.deque.html.axecore.args.AxeRunOptions; import com.deque.html.axecore.results.Results; import com.deque.html.axecore.results.Rule; import com.deque.html.axecore.selenium.AxeBuilder; diff --git a/src/main/java/scanner/ReportGenerator.java b/src/main/java/scanner/ReportGenerator.java index 6a1dc76..422db5d 100644 --- a/src/main/java/scanner/ReportGenerator.java +++ b/src/main/java/scanner/ReportGenerator.java @@ -231,8 +231,7 @@ private static String readLinesAsInputStream(InputStream inputStream) throws IOE private static String readLines(String filePath) { StringBuilder contentBuilder = new StringBuilder(); try (Stream stream = Files.lines(Paths.get(filePath), StandardCharsets.UTF_8)) { - final StringBuilder finalContentBuilder = contentBuilder; - stream.forEach(s -> finalContentBuilder.append(s).append("\n")); + stream.forEach(s -> contentBuilder.append(s).append("\n")); } catch (IOException e) { e.printStackTrace(); } From 79290401fb789291ae4c34aa9b7ca235e2fb1047 Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Fri, 17 May 2024 12:03:42 +0100 Subject: [PATCH 42/43] fix:Update cd.yaml --- .github/workflows/cd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index 6dd4764..f66a22b 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -16,7 +16,7 @@ jobs: tag_name: ${{ steps.release.outputs.tag_name }} release_created: ${{ steps.release.outputs.release_created }} steps: - - uses: google-github-actions/release-please-action@v4 + - uses: googleapis/release-please-action@v4 id: release with: release-type: maven @@ -51,4 +51,4 @@ jobs: env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - \ No newline at end of file + From de52a71d34734d013c01a28ed1d6523609a55671 Mon Sep 17 00:00:00 2001 From: Stefan Ranoszek Date: Fri, 17 May 2024 12:10:20 +0100 Subject: [PATCH 43/43] fix:Update cd.yaml --- .github/workflows/cd.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index f66a22b..88d00c0 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -48,7 +48,7 @@ jobs: with: maven-goal: deploy needs: release-please - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + +