diff --git a/.github/workflows/bomly-guard.yml b/.github/workflows/bomly-guard.yml new file mode 100644 index 0000000..b97a7f5 --- /dev/null +++ b/.github/workflows/bomly-guard.yml @@ -0,0 +1,33 @@ +name: Bomly Guard + +on: + pull_request: + +permissions: + contents: read + pull-requests: write + issues: write + security-events: write + +jobs: + guard: + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Check out repository + uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v6 + with: + node-version: "22" + cache: npm + - name: Guard dependency changes + uses: bomly-dev/bomly-guard@v1 + with: + log-level: debug + ecosystems: npm + fail-on: high + comment-summary-in-pr: always + auditors: -license diff --git a/README.md b/README.md index 654e009..e701ae7 100644 --- a/README.md +++ b/README.md @@ -65,19 +65,29 @@ bomly diff \ Fail your pipeline automatically when high-severity vulnerabilities are introduced: ```yaml -# .github/workflows/bomly.yml -name: Bomly Security Scan -on: [push, pull_request] +# .github/workflows/bomly-guard.yml +name: Bomly Guard +on: + pull_request: + +permissions: + contents: read + pull-requests: write + issues: write + security-events: write jobs: - scan: + guard: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Scan with Bomly - run: | - curl -sSfL https://bomly.dev/install.sh | sh - bomly scan --enrich --audit --fail-on high + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + # Add the package-manager setup steps this ecosystem needs before Bomly Guard. + - uses: bomly-dev/bomly-guard@v1 + with: + fail-on: high + comment-summary-in-pr: always ``` Made with [Bomly](https://bomly.dev) — open-source SCA for every ecosystem. diff --git a/package-lock.json b/package-lock.json index 153f3f1..a9dfa9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,6 +17,7 @@ "larvitutils": "2.3.0", "lodash": "4.17.15", "marked": "0.3.19", + "minimist": "0.0.8", "node-yaml-config": "0.0.5", "semver": "5.7.1", "to": "0.2.9", @@ -846,9 +847,10 @@ } }, "node_modules/minimist": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", - "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==", + "license": "MIT" }, "node_modules/mkdirp": { "version": "0.5.5", diff --git a/package.json b/package.json index 98349f5..02f2301 100644 --- a/package.json +++ b/package.json @@ -16,12 +16,13 @@ "larvitreqparser": "0.2.1", "larvitrouter": "3.0.2", "larvitutils": "2.3.0", + "lodash": "4.17.15", + "marked": "0.3.19", + "minimist": "0.0.8", "node-yaml-config": "0.0.5", "semver": "5.7.1", "to": "0.2.9", - "url": "0.11.0", - "lodash": "4.17.15", - "marked": "0.3.19" + "url": "0.11.0" }, "devDependencies": { "mocha": "^7.0.1"