Skip to content

Add Trustabl Agent Scanner to CI - #68

Open
joshua-trustabl wants to merge 1 commit into
nicofretti:developfrom
joshua-trustabl:add-trustabl-action
Open

Add Trustabl Agent Scanner to CI#68
joshua-trustabl wants to merge 1 commit into
nicofretti:developfrom
joshua-trustabl:add-trustabl-action

Conversation

@joshua-trustabl

@joshua-trustabl joshua-trustabl commented Aug 13, 2026

Copy link
Copy Markdown

We came across your repo and we like how you designed a minimal tool for generating and validating data, with a focus on user-friendliness and transparency. We scanned the repo, and noticed agent runtime reliability findings that might be worth reviewing.

  1. [MEDIUM] Skill fetches untrusted external content
    File: .claude/skills/configuring-models/SKILL.md
    What it means: This skill's body references an external http(s) URL.

  2. [MEDIUM] Skill fetches untrusted external content
    File: .claude/skills/creating-pipeline-templates/SKILL.md
    What it means: This skill's body references an external http(s) URL.

  3. [MEDIUM] Skill fetches untrusted external content
    File: .claude/skills/testing-pipeline-templates/SKILL.md
    What it means: This skill's body references an external http(s) URL.

Recommendations are based on our understanding of agent runtime reliability, some findings may be intentional. Please let us know if this was intentional or if our findings are helpful so we can improve the accuracy of the scanner.

Best,
Trustabl.ai
Open-source AI agent reliability scanner (runs locally, GitHub Action)

Summary by CodeRabbit

  • New Features
    • Added automated security scanning for code changes and pull requests.
    • Scan results are reported without blocking continuous integration checks.
    • Scans can also be started manually when needed.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Added a Trustabl Agent Scanner workflow for pushes to develop, pull requests, and manual runs. It uses scoped permissions, pinned actions, cancellable concurrency, a 15-minute timeout, no persisted checkout credentials, and advisory scan failures.

Changes

Trustabl scanning

Layer / File(s) Summary
Configure Trustabl scanning workflow
.github/workflows/trustabl.yml
Adds Trustabl scan triggers, scoped repository permissions, cancellable concurrency, a 15-minute timeout, pinned actions, scanner version configuration, and advisory error handling.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: 🟡 Moderate · up to c9854

The CI workflow can currently pass while checkout or scanner operational failures are hidden, which may leave the repository without a reliable scan result. Merge should wait until failure handling is tightened or this behavior is explicitly accepted.

Suggested reviewers: nicofretti

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description contains scanner findings but does not follow the required template or explain the workflow, issue, checklist, or validation. Rewrite the description using the required sections, including the workflow summary, related issue, checklist status, and validation results.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding the Trustabl Agent Scanner to CI.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Warning

⚠️ This pull request has been flagged as potential spam (promotional) by CodeRabbit slop detection and should be reviewed carefully.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/trustabl.yml:
- Around line 24-33: Move continue-on-error from the job level to the Trustabl
action step, assigning that step an id so its exit-code output can be
referenced. Add a final validation step that runs unless cancelled and fails
unless checkout succeeded, the Trustabl exit-code output is 0 or 1, and any
failed Trustabl step has exit code 1.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 67aaabea-5d49-43a4-b2fd-0093355cf7a8

📥 Commits

Reviewing files that changed from the base of the PR and between 3a545cc and c98542f.

📒 Files selected for processing (1)
  • .github/workflows/trustabl.yml

Comment on lines +24 to +33
# continue-on-error keeps this job advisory — findings are reported but
# CI does not go red so unrelated work is never blocked.
continue-on-error: true
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- uses: trustabl/trustabl-action@973f666d20b5fbb2e6a4511bd3846e965a08c28b # v0.4.1
with:
version: v0.1.6

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -eu
printf '%s\n' '--- workflow ---'
cat -n .github/workflows/trustabl.yml
printf '%s\n' '--- repository references ---'
rg -n --hidden -S 'trustabl|exit-code|v0\.1\.6|continue-on-error' .github README.md 2>/dev/null || true
printf '%s\n' '--- tracked workflow files ---'
git ls-files '.github/workflows/*'
printf '%s\n' '--- action metadata from repository objects, if available ---'
git ls-tree -r --name-only HEAD | rg '(^|/)(action\.yml|action\.yaml)$|trustabl' || true

Repository: nicofretti/DataGenFlow

Length of output: 2014


🌐 Web query:

Trustabl v0.1.6 exit-code Trustabl action 0.4.1 scanner exit code 2

💡 Result:

The Trustabl scanner, including versions used in the trustabl-action, uses a specific exit code system to communicate scan results and operational status [1][2]. An exit code of 2 indicates a scanner or operational error [1][2]. According to official Trustabl documentation, an exit code of 2 is triggered by any of the following conditions [1][2]: - Scanner/IO error: This includes local installation faults (e.g., disk full, permission denied, or corrupt files) [3]. - No usable rules found: No rules could be located locally, and none were fetchable (run trustabl rules pull) [1][2][3]. - Verification failure: Use of a signed channel (via --rules-source) that failed verification. This includes bad signatures, untrusted/expired keys, expired or rolled-back statements, channel confusion, or digest mismatches [1][2][3]. For comparison, other exit codes include 0 (no findings of medium severity or higher) and 1 (at least one finding of medium severity or higher, or any finding if --strict is enabled) [1][2]. If you are encountering exit code 2 in a CI environment like GitHub Actions, it signifies that the scanner could not successfully complete its execution due to one of these operational or configuration issues rather than a reliability finding [1][2].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
cat -n .github/workflows/trustabl.yml
rg -n --hidden -S 'trustabl|exit-code|v0\.1\.6|continue-on-error' .github README.md 2>/dev/null || true

Repository: nicofretti/DataGenFlow

Length of output: 1780


🏁 Script executed:

#!/bin/bash
set -eu
action_sha=973f666d20b5fbb2e6a4511bd3846e965a08c28b
scanner_sha=bd7d707

printf '%s\n' '--- pinned action metadata ---'
curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl-action/${action_sha}/action.yml"
printf '%s\n' '--- pinned action files ---'
curl -fsSL "https://api.github.com/repos/trustabl/trustabl-action/git/trees/${action_sha}?recursive=1" |
  jq -r '.tree[]?.path' | head -80
printf '%s\n' '--- pinned action README references ---'
curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl-action/${action_sha}/README.md" |
  rg -n -C 3 'exit|output|version|failure' || true

printf '%s\n' '--- scanner README at referenced revision ---'
curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl/${scanner_sha}/README.md" |
  rg -n -C 5 'exit code|exit-code|Exit code|0.*1.*2|operational|finding' || true
printf '%s\n' '--- scanner source references ---'
curl -fsSL "https://api.github.com/repos/trustabl/trustabl/git/trees/${scanner_sha}?recursive=1" |
  jq -r '.tree[]?.path' |
  rg '(^|/)(README|ARCHITECTURE)|\.go$|\.rs$|\.py$' |
  head -100

Repository: nicofretti/DataGenFlow

Length of output: 30343


🌐 Web query:

site:github.com/trustabl/trustabl-action "exit-code"

💡 Result:

An exit code is a numeric value returned by a process to its parent process or operating system upon termination to indicate the result of its execution [1]. In standard computing conventions, an exit code of 0 typically indicates that the process completed successfully, while non-zero exit codes (such as 1 or 2) are used to signal that an error or unexpected condition occurred [1]. These codes allow parent processes, scripts, or automation tools to determine whether a task succeeded or failed and to respond accordingly [1].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
action_sha=973f666d20b5fbb2e6a4511bd3846e965a08c28b
scanner_sha=bd7d707

curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl-action/${action_sha}/action.yml"
curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl-action/${action_sha}/README.md" |
  rg -n -C 3 'exit|output|version|failure' || true
curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl/${scanner_sha}/README.md" |
  rg -n -C 5 'exit code|exit-code|Exit code|operational|finding' || true

Repository: nicofretti/DataGenFlow

Length of output: 28926


🏁 Script executed:

#!/bin/bash
set -eu
sha=973f666d20b5fbb2e6a4511bd3846e965a08c28b
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl-action/${sha}/dist/index.js" > "$tmp"
printf '%s\n' '--- output assignment and exit handling ---'
rg -n -C 5 'exit-code|setOutput|setFailed|process\.exit|exec|spawn|native exit|result' "$tmp" | head -240
printf '%s\n' '--- action references to error handling ---'
rg -n -C 4 'catch|throw new Error|core\.setFailed|failed|error' "$tmp" | head -240
printf '%s\n' '--- bundle size ---'
wc -c "$tmp"

Repository: nicofretti/DataGenFlow

Length of output: 27363


🌐 Web query:

GitHub Actions steps outcome continue-on-error step outputs documentation

💡 Result:

In GitHub Actions, when a step uses the continue-on-error: true setting, it fundamentally changes how subsequent steps evaluate the step's result [1][2]. To accurately check the status of such a step, you must distinguish between its outcome and its conclusion [1][3]. The two properties are defined as follows: 1. steps.<step_id>.outcome: Represents the result of the step before the continue-on-error logic is applied [1][2]. If the step fails, this value will be 'failure', regardless of the continue-on-error setting [1][4]. 2. steps.<step_id>.conclusion: Represents the final result of the step after the continue-on-error logic is applied [1][2]. If a step with continue-on-error: true fails, the conclusion is rewritten to 'success' [1][3]. Because the conclusion is forced to 'success' for steps with continue-on-error: true, conditional checks using failure or evaluating the step's conclusion in subsequent steps will fail to detect the actual failure [3][5]. To properly gate logic on the real result of a continue-on-error step, you should reference the outcome property in your conditional expressions [3][6]. Example: - id: my-step continue-on-error: true run: exit 1 - if: steps.my-step.outcome == 'failure' run: echo "The step actually failed, but the job continues." Note that steps.<step_id>.outputs continues to function normally for any outputs produced by the step, provided the step generated them before failing [1]. You can access these in the same way as any other step: ${{ steps.<step_id>.outputs.<output_name> }} [1].

Citations:


🏁 Script executed:

#!/bin/bash
set -eu
sha=973f666d20b5fbb2e6a4511bd3846e965a08c28b
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl-action/${sha}/dist/index.js" > "$tmp"
rg -n -C 5 'exit-code|setOutput|setFailed|process\.exit|exec|spawn|catch|throw new Error|core\.setFailed' "$tmp" | head -300

Repository: nicofretti/DataGenFlow

Length of output: 16982


🏁 Script executed:

#!/bin/bash
set -eu
sha=973f666d20b5fbb2e6a4511bd3846e965a08c28b
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl-action/${sha}/dist/index.js" > "$tmp"
printf '%s\n' '--- exact Trustabl output markers ---'
rg -n -i -C 12 'exit.?code|readiness.?score|risk.?score|findings.?count|trustabl native|native exit|scan result|severity.?threshold' "$tmp" | tail -300
printf '%s\n' '--- final bundle section ---'
tail -260 "$tmp"

Repository: nicofretti/DataGenFlow

Length of output: 50379


🌐 Web query:

site:github.com/trustabl/trustabl-action/blob v0.4.1 "setOutput" "exit-code"

💡 Result:

In v0.4.1:

  • setOutput does not appear in action.yml. [1]
  • exit-code is declared as an action output with values: 0 = clean, 1 = findings, 2 = error. [2]

The implementation is likely in dist/index.js, referenced as the action’s main entry point. [2]


🏁 Script executed:

#!/bin/bash
set -eu
sha=973f666d20b5fbb2e6a4511bd3846e965a08c28b
tmp=$(mktemp)
trap 'rm -f "$tmp"' EXIT
curl -fsSL "https://raw.githubusercontent.com/trustabl/trustabl-action/${sha}/dist/index.js" > "$tmp"
rg -n -i -C 12 'exit.?code|readiness.?score|risk.?score|findings.?count|trustabl native|native exit|scan result|severity.?threshold' "$tmp" | tail -300
tail -260 "$tmp"

Repository: nicofretti/DataGenFlow

Length of output: 50379


Fail the workflow on Trustabl operational errors.

Job-level continue-on-error: true masks checkout and Trustabl failures. Move it to the Trustabl step. Add a final step that runs unless cancelled and fails unless checkout succeeds, steps.trustabl.outputs.exit-code is 0 or 1, and a failed Trustabl step has exit code 1. This keeps findings advisory while rejecting scanner, I/O, and missing-output failures.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/trustabl.yml around lines 24 - 33, Move continue-on-error
from the job level to the Trustabl action step, assigning that step an id so its
exit-code output can be referenced. Add a final validation step that runs unless
cancelled and fails unless checkout succeeded, the Trustabl exit-code output is
0 or 1, and any failed Trustabl step has exit code 1.

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.

1 participant