Repository navigation
ci: port the CLI's supply-chain and quality workflows, add README badges #46
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/usr/bin/env sh | ||
| set -eu | ||
|
|
||
| make fmt-check | ||
| make lint |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Default owner for everything in the repo. | ||
| # Order matters: the last matching pattern takes precedence. | ||
| * @bomly-guy |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # To get started with Dependabot version updates, you'll need to specify which | ||
| # package ecosystems to update and where the package manifests are located. | ||
| # Please see the documentation for all configuration options: | ||
| # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file | ||
|
|
||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "gomod" # See documentation for possible values | ||
| directory: "/" # Location of package manifests | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| gomod-minor: | ||
| update-types: | ||
| - "minor" | ||
| gomod-patch: | ||
| update-types: | ||
| - "patch" | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| github-actions-minor: | ||
| update-types: | ||
| - "minor" | ||
| github-actions-patch: | ||
| update-types: | ||
| - "patch" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| name: Bomly Guard | ||
|
|
||
| on: | ||
| pull_request: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| guard: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
| security-events: write | ||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Run Bomly Guard | ||
| uses: bomly-dev/bomly-guard@3f0869a7d411103210a63c1e64315a48cb2a5c20 # v1.2.0 | ||
| with: | ||
| fail-on: high | ||
| comment-summary-in-pr: always | ||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,27 @@ | ||||||||||||
| name: Dependency review | ||||||||||||
|
|
||||||||||||
| on: | ||||||||||||
| pull_request: | ||||||||||||
| branches: | ||||||||||||
| - main | ||||||||||||
|
|
||||||||||||
| permissions: | ||||||||||||
| contents: read | ||||||||||||
|
Comment on lines
+8
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🔎 Supported by static analysis🏁 Script executed: #!/bin/bash
set -euo pipefail
curl -fsSL 'https://raw.githubusercontent.com/actions/dependency-review-action/a1d282b36b6f3519aa1f3fc636f609c47dddb294/action.yml' |
grep -n -A2 -B2 'comment-summary-in-pr'Repository: bomly-dev/bomly-sdk Length of output: 517 🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/dependency-review.yml
printf '%s\n' '--- checkout/action references ---'
rg -n -C 3 'actions/checkout|dependency-review-action|comment-summary-in-pr|permissions' .github/workflows/dependency-review.ymlRepository: bomly-dev/bomly-sdk Length of output: 1530 🤖 get_repo_knowledge executed:
Length of output: 640 🏁 Script executed: #!/bin/bash
set -euo pipefail
cat -n .github/workflows/dependency-review.ymlRepository: bomly-dev/bomly-sdk Length of output: 980 Grant the permission required by the PR summary. Because Proposed fix permissions:
contents: read
+ pull-requests: write📝 Committable suggestion
Suggested change
🤖 Prompt for AI AgentsSource: MCP tools |
||||||||||||
|
|
||||||||||||
| concurrency: | ||||||||||||
| group: dependency-review-${{ github.workflow }}-${{ github.ref }} | ||||||||||||
| cancel-in-progress: true | ||||||||||||
|
|
||||||||||||
| jobs: | ||||||||||||
| review: | ||||||||||||
| name: Dependency review | ||||||||||||
| runs-on: ubuntu-latest | ||||||||||||
| steps: | ||||||||||||
| - name: Check out repository | ||||||||||||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||||||||||||
|
Comment on lines
+20
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
printf '%s\n' '--- dependency-review.yml ---'
cat -n .github/workflows/dependency-review.yml
printf '%s\n' '--- bomly-guard.yml ---'
cat -n .github/workflows/bomly-guard.ymlRepository: bomly-dev/bomly-sdk Length of output: 1842 🌐 Web query:
💡 Result: In the actions/checkout GitHub Action, the persist-credentials input determines whether the action configures the authentication token or SSH key in the local Git configuration [1][2]. When persist-credentials is set to true (the default in many versions), the action writes your authentication credentials to the local.git/config file [1][3]. This allows subsequent git commands in your workflow steps—such as git push or git fetch—to run automatically with the necessary authentication [1][4]. The action removes these credentials during the post-job cleanup phase [1][2]. Setting persist-credentials to false opts out of this behavior [1][3]. You would use this configuration if you do not want your credentials stored in the local Git configuration, which can be a security preference to further isolate sensitive authentication data [1][5]. If you choose to set this to false, your workflow steps will not have automatic authenticated access to Git commands provided by the checkout action, and you will need to handle authentication for those commands manually if required [1][2]. Note that the official documentation has evolved to include improved credential security, where credentials may be stored in a separate file under $RUNNER_TEMP rather than directly in.git/config [1][2]. Efforts have also been discussed and implemented to change the default behavior to false to minimize security risks [5]. Citations:
🤖 get_repo_knowledge executed:
Length of output: 631 🏁 Script executed: #!/bin/bash
set -eu
for f in .github/workflows/dependency-review.yml .github/workflows/bomly-guard.yml; do
echo "--- $f ---"
sed -n '1,140p' "$f"
doneRepository: bomly-dev/bomly-sdk Length of output: 1493 🌐 Web query:
💡 Result: The default value for the persist-credentials input in the actions/checkout GitHub Action is true [1][2][3]. This setting determines whether the action configures the authentication token (or SSH key) with the local git configuration, enabling subsequent git commands in your workflow to run authenticated [4][1][3]. While there has been public discussion and community requests to change this default to false to reduce potential security risks [5][6], it remains set to true in current versions (including v6) [1]. In response to security concerns regarding the exposure of the GITHUB_TOKEN, the action was updated (notably in v6) to store credentials in a separate, more secure file under $RUNNER_TEMP rather than directly within the.git/config file [4][3][7]. This change ensures that credentials are managed more securely while maintaining the existing functionality for workflow steps [3][6]. Users who wish to opt out of this behavior can still explicitly set persist-credentials: false in their workflow configuration [4][8][3]. Citations:
🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- tracked workflow files ---'
git ls-files .github/workflows
printf '%s\n' '--- relevant workflow contents ---'
for f in .github/workflows/dependency-review.yml .github/workflows/bomly-guard.yml; do
echo "### $f"
cat -n "$f"
doneRepository: bomly-dev/bomly-sdk Length of output: 2153 🌐 Web query:
💡 Result: In the action.yml configuration for the actions/checkout GitHub Action, the persist-credentials input has a default value of true [1][2][3]. This default remains unchanged in version 7.0.1 [1]. While there has been community discussion regarding changing this default to false to enhance security and reduce the risk of unintentionally exposing the GITHUB_TOKEN [4], the official action continues to set it to true by default [1]. Users who wish to disable this behavior must explicitly set persist-credentials: false in their workflow configuration [5][6]. Citations:
🌐 Web query:
💡 Result: By default, GitHub Actions workflows triggered by pull requests from forked repositories are granted a read-only GITHUB_TOKEN to ensure security and prevent unauthorized access [1][2][3]. Even if you explicitly configure write permissions in your workflow's Citations:
Sensitive Data Exposure (CWE-522): Insufficiently Protected Credentials Reachability: External · Exploitability: Difficult Disable checkout credential persistence before third-party actions. Both workflows use the default
🧰 Tools🪛 zizmor (1.29.0)[warning] 20-21: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false (artipacked) 📍 Affects 2 files
🤖 Prompt for AI AgentsSources: MCP tools, Linters/SAST tools |
||||||||||||
|
|
||||||||||||
| - name: Review dependencies | ||||||||||||
| uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 | ||||||||||||
| with: | ||||||||||||
| fail-on-severity: high | ||||||||||||
| comment-summary-in-pr: on-failure | ||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # Scheduled native Go fuzzing over the module's untrusted-input boundaries: | ||
| # package URL parsing and canonicalization, SPDX expression classification, | ||
| # graph and package-registry JSON, wire payloads, and the origin, contact, | ||
| # URL, and external-reference normalizers. Every parser ships its own fuzz | ||
| # target (see AGENTS.md), and scripts/run-fuzz.sh discovers them all, so a | ||
| # new target is exercised here without registration. Deeper runs happen | ||
| # locally via `make fuzz FUZZTIME=...`. | ||
| name: Fuzz | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: "0 8 * * *" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: fuzz-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| fuzz: | ||
| name: Native Go fuzzing | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Set up Go | ||
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | ||
| with: | ||
| go-version-file: go.mod | ||
| cache: true | ||
| cache-dependency-path: go.sum | ||
|
|
||
| - name: Run native Go fuzz targets | ||
| run: make fuzz FUZZTIME=2m | ||
|
|
||
| - name: Upload fuzz failures | ||
| if: failure() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: go-fuzz-failures | ||
| path: | | ||
| **/testdata/fuzz/** | ||
| if-no-files-found: ignore | ||
| retention-days: 7 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: Scorecard | ||
|
|
||
| on: | ||
| branch_protection_rule: | ||
| push: | ||
| branches: | ||
| - main | ||
| schedule: | ||
| # Runs every Monday at 5:00am UTC. Adjust the schedule as needed. | ||
| - cron: "0 5 * * 1" | ||
|
|
||
| # Declare default permissions as read only. | ||
| permissions: read-all | ||
|
|
||
| concurrency: | ||
| group: scorecard-${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| analysis: | ||
| name: Scorecard analysis | ||
| runs-on: ubuntu-latest | ||
| # `publish_results: true` only works when run from the default branch. conditional can be removed if disabled. | ||
| if: github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request' | ||
| permissions: | ||
| # Needed to upload the results to code-scanning dashboard. | ||
| security-events: write | ||
| # Needed to publish results and get a badge (see publish_results below). | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Check out repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Run analysis | ||
| uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4 | ||
| with: | ||
| results_file: results.sarif | ||
| results_format: sarif | ||
| publish_results: true | ||
|
|
||
| - name: Upload artifact | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| with: | ||
| name: SARIF file | ||
| path: results.sarif | ||
| retention-days: 5 | ||
|
|
||
| - name: Upload to code-scanning | ||
| uses: github/codeql-action/upload-sarif@ff2f1c621b7f889edc0d3c761ac2e6a3f8cdb0dd # v4.31.11 | ||
| with: | ||
| sarif_file: results.sarif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| version: "2" | ||
| linters: | ||
| default: none | ||
| enable: | ||
| - errcheck | ||
| - govet | ||
| - ineffassign | ||
| - staticcheck | ||
| exclusions: | ||
| generated: lax | ||
| presets: | ||
| - comments | ||
| - common-false-positives | ||
| - legacy | ||
| - std-error-handling | ||
| rules: | ||
| - linters: | ||
| - errcheck | ||
| path: _test\.go | ||
| - linters: | ||
| - staticcheck | ||
| text: "SA5011" | ||
| path: _test\.go | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ | ||
| issues: | ||
| max-issues-per-linter: 0 | ||
| max-same-issues: 0 | ||
| formatters: | ||
| exclusions: | ||
| generated: lax | ||
| paths: | ||
| - third_party$ | ||
| - builtin$ | ||
| - examples$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🤖 get_repo_knowledge executed:
get_repo_knowledge bomly-dev/bomly-sdk /tmp/coderabbit-repo-knowledge/bomly-dev-bomly-sdk-8ba54442Length of output: 659
🏁 Script executed:
Repository: bomly-dev/bomly-sdk
Length of output: 2552
🏁 Script executed:
Repository: bomly-dev/bomly-sdk
Length of output: 14104
🌐 Web query:
bomly-dev/bomly-guard v1.2.0 comment-summary-in-pr concurrency💡 Result:
In the bomly-dev/bomly-guard GitHub Action (including version 1.2.0), the comment-summary-in-pr feature manages pull request comments by updating an existing comment in place rather than creating new ones on every run [1]. This mechanism ensures stability and avoids spamming the pull request thread [1]. The action posts comments using the GitHub issue-comments API, which requires the workflow to have both pull-requests: write and issues: write permissions [1][2]. When configured with comment-summary-in-pr set to always or on-failure, the action performs these updates sequentially as part of the job's execution flow [1][3]. There are no specific concurrency settings or lock mechanisms exposed in the action's inputs for this feature, as the internal logic is designed to handle the update process predictably by targeting the existing comment associated with the pull request [1].
Citations:
Serialize Bomly Guard runs per pull request.
This workflow updates the pull request comment on every run but defines no concurrency group. An older run can finish after a newer run and overwrite the comment with stale dependency results. Add a pull-request-specific concurrency group with
cancel-in-progress: true.Proposed fix
📝 Committable suggestion
🧰 Tools
🪛 zizmor (1.29.0)
[warning] 3-4: insufficient job-level concurrency limits (concurrency-limits): workflow is missing concurrency setting
(concurrency-limits)
🤖 Prompt for AI Agents
Sources: MCP tools, Linters/SAST tools