Skip to content

Commit 2f07f3e

Browse files
authored
chore: grype src scan pi28 (#179)
* chore: configure grype src code scan * feat: add gyrpe src scan and update deps --------- Co-authored-by: Juan Correa <gibaros@users.noreply.github.com>
1 parent 68b5f3e commit 2f07f3e

File tree

5 files changed

+167
-25
lines changed

5 files changed

+167
-25
lines changed

.circleci/config.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,32 @@
1+
# CircleCI configuration using the mojaloop/build orb
2+
# This streamlined config uses the mojaloop/build orb for standardized CI/CD workflows
3+
#
4+
# The orb automatically handles:
5+
# - PR title checking
6+
# - Dependency installation and caching
7+
# - Linting
8+
# - Unit, integration, and functional testing
9+
# - Vulnerability checking (npm audit)
10+
# - License scanning
11+
# - Grype security scanning (source code scanning for this library)
12+
# - Automated releases to npm and GitHub
13+
# - Slack notifications
14+
#
15+
# To enable this configuration:
16+
# 1. Go to CircleCI project settings → Advanced
17+
# 2. Ensure "Enable dynamic config using setup workflows" is enabled
18+
119
version: 2.1
220
setup: true
21+
322
orbs:
4-
build: mojaloop/build@1.0.64
23+
build: mojaloop/build@1.1.6
24+
525
workflows:
626
setup:
727
jobs:
828
- build/workflow:
29+
context: org-global
930
filters:
1031
tags:
11-
only: /v\d+(\.\d+){2}(-[a-zA-Z-][0-9a-zA-Z-]*\.\d+)?/
32+
only: /v\d+(\.\d+){2}(-[a-zA-Z-][0-9a-zA-Z-]*\.\d+)?/

.grype.yaml

Lines changed: 36 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,40 @@
1-
disabled: true
1+
# Grype vulnerability scanning configuration for central-services-stream
2+
# This is a library project without Docker images, so we use source scanning
3+
scan-type: source
24

5+
# Enable vulnerability scanning
6+
disabled: false
7+
8+
# Vulnerability ignore rules
9+
# Add specific CVEs here if they are false positives or acceptable risks
310
ignore:
11+
# Example format for ignoring specific vulnerabilities:
12+
# - vulnerability: "CVE-2023-xxxxx"
13+
# reason: "False positive in dev dependency that doesn't affect production"
14+
# - vulnerability: "GHSA-xxxx-xxxx-xxxx"
15+
# package:
16+
# name: "package-name"
17+
# version: "1.0.0"
18+
# reason: "Not exploitable in our usage context"
419

5-
# Set output format defaults
20+
# Output formats for scan results
621
output:
7-
- "table"
8-
- "json"
9-
10-
# Modify your CircleCI job to check critical count
11-
search:
12-
scope: "squashed"
13-
quiet: false
14-
check-for-app-update: false
22+
- "table" # Human-readable table format
23+
- "json" # Machine-readable JSON for further processing
24+
25+
# Grype configuration options
26+
quiet: false # Show progress and status messages
27+
check-for-app-update: false # Don't check for Grype updates during CI
28+
only-fixed: false # Show all vulnerabilities, not just those with fixes
29+
add-cpes-if-none: false # Don't add CPEs if none are found
30+
by-cve: false # Group by vulnerability rather than CVE
31+
32+
# Database settings
33+
db:
34+
auto-update: true # Auto-update the vulnerability database
35+
validate-age: true # Validate the age of the vulnerability database
36+
max-allowed-built-age: 120h # Maximum age of the vulnerability database (5 days)
37+
38+
# Severity thresholds (handled by the orb, but documented here for clarity)
39+
# The build will fail on Critical, High, or Medium severity vulnerabilities
40+
# Low and Negligible severities are reported but won't fail the build

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
Streaming library for central services
1010

11+
## CI/CD
12+
13+
This repository uses the [mojaloop/build](https://github.com/mojaloop/ci-config-orb-build) CircleCI orb for standardized CI/CD workflows, including automated Grype vulnerability scanning for source code security.
14+
1115
## Usage
1216

1317
### Kafka

0 commit comments

Comments
 (0)