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

Hof 405 #61

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Hof 405 #61

wants to merge 9 commits into from

Conversation

DivineTaminangHO
Copy link

  • Anchore replaced with trivy scan in the Drone.yaml
  • The node image updated from node:14 to node:18
  • The cve-exception file updated

What?: I have replaced anchore  with Trivy scan
why?: This is because the ACP team has now decided to use Trivy instead of Anchore scans. Anchore has not been supported since January 2023 and as result runs the risk of not detecting vulnerabilities effectively.  
Anchore is an open source scanner which scans the following: OS packages and software dependencies in use (SBOM)
Known vulnerabilities (CVEs)
IaC issues and misconfigurations
Sensitive information and secrets
Software licenses
https://docs.acp.homeoffice.gov.uk/how-to/security/trivy/#trivy-overview
How?:
Trivy has been added to drone.yaml pipeline which will scan against any vulnerability to primarily detect CVEs present in OS and Language packages. In addition it will try to detect any secrets like private rsa keys within the container image layers.
Copy link

@adityababumallisettiHO adityababumallisettiHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scan-image step has to run after the Image has been pushed to the Quay.io repo

@@ -24,14 +24,30 @@ steps:
- n=0; while [ "$n" -lt 60 ] && [ ! docker stats --no-stream ]; do n=$(( n + 1 )); sleep 1; done
- docker build -t html-pdf-converter .

- name: scan-image

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Trivy Scan step should run after Docker push to Quay.
Also Image name has to be set to quay.io/ukhomeofficedigital/html-pdf-converter:$${DRONE_TAG}
Please follow ETA .drone.yml
We need these added
SEVERITY: MEDIUM,HIGH,CRITICAL
FAIL_ON_DETECTION: false
IGNORE_UNFIXED: true
and
ALLOW_CVE_LIST_FILE: trivy-cve-exceptions.txt
Also please check the conditions of Drone that executes the drone pipeline.

Anchore replaced by Trivy scan.
some additional details added to trivy scan steps
@DivineTaminangHO DivineTaminangHO self-assigned this Mar 13, 2024
Corrected some environmental variable for the image-to-quay step
@DivineTaminangHO
Copy link
Author

What?: I have replaced anchore with Trivy scan
why?: This is because the ACP team has now decided to use Trivy instead of Anchore scans. Anchore has not been supported since January 2023 and as result runs the risk of not detecting vulnerabilities effectively.
Anchore is an open source scanner which scans the following: OS packages and software dependencies in use (SBOM)
Known vulnerabilities (CVEs)
IaC issues and misconfigurations
Sensitive information and secrets
Software licenses
https://docs.acp.homeoffice.gov.uk/how-to/security/trivy/#trivy-overview
How?:
Trivy has been added to drone.yaml pipeline which will scan against any vulnerability to primarily detect CVEs present in OS and Language packages. In addition it will try to detect any secrets like private rsa keys within the container image layers.

Code edited with commented sections for anchore removed
Copy link

@adityababumallisettiHO adityababumallisettiHO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct the indentations.

.drone.yml Outdated
# IMAGE_NAME: html-pdf-converter
# WHITELIST_FILE: cve-exceptions.txt

steps:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please Remove "Steps"

indentitions changes
changes to scan-image yaml files' intentition
@adityababumallisettiHO
Copy link

adityababumallisettiHO commented Mar 14, 2024

here is our ways of working page
https://collaboration.homeoffice.gov.uk/display/DSASS/HOF-+The+Way+We+Work
Please update Git commits and PRs to HOF standards.
we are following the Chris beams git commit method and Gonzalo Banuelos PR method
This the link you can find in the documnetation that helps you : https://cbea.ms/git-commit/#separate

indentation corrected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants