Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: amended workflows #7

Merged
merged 44 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
2661028
added workflows and amended pom
sdh100shaun May 9, 2024
78a0aab
amended pom for active support and added to security action
sdh100shaun May 9, 2024
fb2a0b1
feat: snyk
sr4850 May 9, 2024
ecbe0b8
feat: snyk
sr4850 May 9, 2024
f697056
feat: snyk
sr4850 May 9, 2024
e3eca2a
remove maven file
sdh100shaun May 9, 2024
048632a
added snyk ignore
sdh100shaun May 9, 2024
74c5481
amending the pom again
sdh100shaun May 9, 2024
442af2c
feat:pom changes
sr4850 May 9, 2024
b4c300e
feat: axe core
sr4850 May 9, 2024
1d4160a
feat:snyk ignore
sr4850 May 9, 2024
8549256
amended pom
sdh100shaun May 9, 2024
c44e6ee
feat:compiler
sr4850 May 9, 2024
bc0b52d
Merge branch 'feat-vol-5327-b' of github.com:dvsa/vol-accessibility-l…
sr4850 May 9, 2024
a8b0ae0
added in dependancy
sdh100shaun May 9, 2024
4863c9a
snyk ignore
sdh100shaun May 9, 2024
59236a5
added settings
sdh100shaun May 9, 2024
f516060
added settings
sdh100shaun May 9, 2024
8adf9f1
downgrade to java 8
sdh100shaun May 9, 2024
fe4c7cd
regrade to 11
sdh100shaun May 9, 2024
e08905f
compiler to 11
sdh100shaun May 9, 2024
d0283e4
changed compiler version
sdh100shaun May 9, 2024
cf93099
amended workflows
sdh100shaun May 11, 2024
93a101c
amended ci
sdh100shaun May 11, 2024
96e08e4
amended ci
sdh100shaun May 11, 2024
c22404f
fix ci maven
sdh100shaun May 11, 2024
950ed65
fix ci maven path
sdh100shaun May 11, 2024
af80869
fix ci maven path
sdh100shaun May 11, 2024
69f255f
fix ci maven path
sdh100shaun May 11, 2024
3567dd3
fix ci maven path
sdh100shaun May 11, 2024
0bf1808
another approach
sdh100shaun May 13, 2024
c33e8ff
amended checkout in custom action
sdh100shaun May 13, 2024
a871670
same as uri constructor
sdh100shaun May 13, 2024
314b8ba
amended back to job
sdh100shaun May 13, 2024
238c221
amended back to job
sdh100shaun May 13, 2024
49aef66
amended back to job
sdh100shaun May 13, 2024
c2895a7
chore : update readme
sr4850 May 16, 2024
78af345
chore : amend pom
sr4850 May 16, 2024
0e25ed3
chore : amend security.yamal as per comments
sr4850 May 16, 2024
65045ae
chore: copy profile directly from api calls
sr4850 May 16, 2024
e734b36
chore: amend yamal
sr4850 May 16, 2024
b5d01dc
fix:revert scanner changes
sr4850 May 16, 2024
7929040
fix:Update cd.yaml
sr4850 May 17, 2024
de52a71
fix:Update cd.yaml
sr4850 May 17, 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
54 changes: 54 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -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: googleapis/release-please-action@v4
id: release
with:
release-type: maven


publish:
if: ${{needs.release-please.outputs.release_created}}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
needs:
- release-please
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'

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




22 changes: 22 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CI

on:
pull_request:

jobs:

security:
name: Security
uses: ./.github/workflows/security.yaml
secrets: inherit

build-maven:
name: Build Maven
uses: ./.github/workflows/maven.yaml
with:
maven-goal: package
needs: security




38 changes: 0 additions & 38 deletions .github/workflows/maven-publish.yml

This file was deleted.

26 changes: 26 additions & 0 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
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
- uses: whelk-io/maven-settings-xml-action@v22
with:
servers: '[{ "id":"dvsa-github-packages", "configuration": { "httpHeaders": { "property": { "name":"Authorization", "value":"Bearer ${{ secrets.GITHUB_TOKEN }}"} } } } ]'

- run: mvn -B -P github ${{ inputs.maven-goal}}

42 changes: 42 additions & 0 deletions .github/workflows/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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
- uses: whelk-io/maven-settings-xml-action@v22
with:
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 }}
45 changes: 45 additions & 0 deletions .snyk
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# 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
SNYK-JAVA-SOFTWAREAMAZONION-6153869:
- '*':
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-08T17:23:14.009Z
created: 2024-05-09T17:23:14.014Z
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
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: {}
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
<dependency>
<groupId>org.dvsa.testing.framework</groupId>
<artifactId>accessibility-library</artifactId>
<version>[insert latest version of package]</version>
</dependency>
```

Loading