Skip to content

Commit 2ba6d0d

Browse files
authored
Remove scan dependencies git hook (nhs-england-tools#132)
## Description There is not much benefit in running a potentially outdated CVE check locally, especially considering that the GitHub Action always performs a check against the latest version. - Fixes nhs-england-tools#128 ## Context Grype [updates its database](https://github.com/anchore/grype#data-staleness) at the first run or every 5 days. The size is approximately 1GB. It may take minutes for the scan dependencies git hook to complete. This is not a good user experience. ## Type of changes - [x] Refactoring (non-breaking change) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would change existing functionality) - [x] Bug fix (non-breaking change which fixes an issue) ## Checklist - [x] I am familiar with the [contributing guidelines](../docs/CONTRIBUTING.md) - [x] I have followed the code style of the project - [ ] I have added tests to cover my changes - [x] I have updated the documentation accordingly - [ ] This PR is a result of pair or mob programming --- ## Sensitive Information Declaration To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including [PII (Personal Identifiable Information) / PID (Personal Identifiable Data)](https://digital.nhs.uk/data-and-information/keeping-data-safe-and-benefitting-the-public) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter. - [x] I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.
1 parent 7f19931 commit 2ba6d0d

File tree

4 files changed

+0
-46
lines changed

4 files changed

+0
-46
lines changed

docs/user-guides/Run_Git_hooks_on_commit.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ The [pre-commit](https://pre-commit.com/) framework is a powerful tool for manag
1717
- [check-file-format.sh](../../scripts/githooks/check-file-format.sh)
1818
- [check-markdown-format.sh](../../scripts/githooks/check-markdown-format.sh)
1919
- [check-terraform-format.sh](../../scripts/githooks/check-terraform-format.sh)
20-
- [scan-dependencies.sh](../../scripts/githooks/scan-dependencies.sh)
2120
- [scan-secrets.sh](../../scripts/githooks/scan-secrets.sh)
2221
- Configuration
2322
- [pre-commit.yaml](../../scripts/config/pre-commit.yaml)

docs/user-guides/Scan_dependencies.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ In modern software development, leveraging third-party dependencies is a common
2121
- [grype.yaml](../../scripts/config/grype.yaml): A configuration file for the CVE scanner
2222
- [scan-dependencies/action.yaml](../../.github/actions/scan-dependencies/action.yaml): GitHub action to run the scripts as part of the CI/CD pipeline
2323
- [.gitignore](../../.gitignore): Excludes the `*sbom*report.json` and `*vulnerabilities*report.json` report files created during the process
24-
- [scan-dependencies.sh](../../scripts/githooks/scan-dependencies.sh): a Git hook to scan dependencies upon each commit. For a more comprehensive information of how these Git hooks operate, please refer to the [Run Git hooks on commit](./Run_Git_hooks_on_commit.md) guide
2524

2625
## Configuration checklist
2726

scripts/config/pre-commit.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,3 @@ repos:
2727
entry: ./scripts/githooks/check-terraform-format.sh
2828
language: script
2929
pass_filenames: false
30-
- repo: local
31-
hooks:
32-
- id: scan-dependencies
33-
name: Scan Dependencies
34-
entry: ./scripts/githooks/scan-dependencies.sh
35-
language: script
36-
pass_filenames: false

scripts/githooks/scan-dependencies.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)