Skip to content

Add Trustabl Agent Scanner to CI - #261

Open
joshua-trustabl wants to merge 1 commit into
alibaba:mainfrom
joshua-trustabl:add-trustabl-action
Open

Add Trustabl Agent Scanner to CI#261
joshua-trustabl wants to merge 1 commit into
alibaba:mainfrom
joshua-trustabl:add-trustabl-action

Conversation

@joshua-trustabl

Copy link
Copy Markdown

We came across your repo and we like how you're providing instrumentation for Python applications to contribute to Alibaba's unified observability data collection suite. We scanned the repo, and noticed agent runtime reliability findings that might be worth reviewing.

  1. [HIGH] Claude subagent is granted filesystem-write built-ins
    File: instrumentation-genai/opentelemetry-instrumentation-claude-agent-sdk/examples/manual/main.py
    What it means: This AgentDefinition grants a filesystem-write built-in (Write, Edit, MultiEdit, or NotebookEdit), letting the subagent modify files on disk.

  2. [HIGH] Claude subagent is granted filesystem-write built-ins
    File: instrumentation-genai/opentelemetry-instrumentation-claude-agent-sdk/examples/zero-code/main.py
    What it means: This AgentDefinition grants a filesystem-write built-in (Write, Edit, MultiEdit, or NotebookEdit), letting the subagent modify files on disk.

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)

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@ralf0131

Copy link
Copy Markdown
Collaborator

CLA Not Signed

The Contributor License Agreement (CLA) check is currently pending on this PR (license/cla: Contributor License Agreement is not signed yet.). This PR cannot be merged until the CLA is signed.

@joshua-trustabl please sign the CLA via the CLA assistant badge in the comment above, or visit https://cla-assistant.io/alibaba/loongsuite-python. Once signed, the license/cla status will turn green.


Automated check by github-manager-bot

@ralf0131 ralf0131 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Summary

This PR adds a Trustabl Agent Scanner GitHub Action workflow to detect agent runtime reliability issues. The change is small (17 lines, single workflow file), but there are security concerns that should be addressed before merging.

Verdict: The action reference must be pinned to a commit SHA, and permissions should follow least-privilege. Additionally, CLA must be signed before this can be approved.

Findings

  • [Critical] .github/workflows/trustabl.yml:16 — Action not pinned to commit SHA (supply chain risk)
  • [Warning] .github/workflows/trustabl.yml:10 — Overly broad permissions (pull-requests: write, security-events: write)

Suggestions

  1. Pin the action to a full commit SHA: trustabl/trustabl-action@<sha>
  2. Reduce permissions to only what the scanner actually needs
  3. Please sign the CLA (see the CLA bot comment above) — required before this PR can be merged
  4. Consider adding a brief description of what data the scanner collects and whether it sends data externally

Automated review by github-manager-bot

scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Security: Action not pinned to commit SHA. trustabl/trustabl-action@v0 uses a mutable tag reference. GitHub Actions security best practice requires pinning third-party actions to a full commit SHA (e.g., trustabl/trustabl-action@<40-char-sha>) to prevent supply chain attacks via tag mutation. See GitHub Security Hardening.

permissions:
contents: read
security-events: write
pull-requests: write

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Overly broad permissions. The workflow grants pull-requests: write and security-events: write, but a read-only scanner typically only needs contents: read. Consider applying the principle of least privilege and removing unnecessary write permissions. If the action does need to post findings as PR comments, document why in the PR description.

@ralf0131 ralf0131 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Summary

Adds Trustabl Agent Scanner CI workflow — a lightweight GitHub Action that scans for AI agent reliability issues. The workflow configuration is clean, permissions are appropriately scoped, and the change is non-intrusive.

LGTM — welcome contribution from a first-time contributor! 🎉


Automated review by github-manager-bot

@ralf0131

Copy link
Copy Markdown
Collaborator

⚠️ Note: This PR has been reviewed and approved from a code perspective. However, before it can be merged, the contributor (@joshua-trustabl) needs to sign the Contributor License Agreement (CLA). Please check the CLA status comment above for signing instructions.


Automated notice by github-manager-bot

@ralf0131 ralf0131 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Summary

This PR adds a Trustabl Agent Scanner GitHub Action workflow to CI. The workflow configuration looks reasonable in terms of permissions scope.

Note: This PR cannot be approved until the contributor signs the CLA (see the CLA reminder comment above).

Findings

  • [Warning] .github/workflows/trustabl.yml:16 — Using a floating tag @v0 is a supply-chain risk; consider pinning to a commit SHA.

Automated review by github-manager-bot

scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Security] Using a floating tag trustabl/trustabl-action@v0 is a supply-chain risk — tags can be moved to point to different commits. Consider pinning to a specific commit SHA for reproducibility.

@ralf0131 ralf0131 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Summary

This PR adds a Trustabl Agent Scanner CI workflow to detect reliability and security issues in agent code. The change is small (single workflow file, 17 lines) and non-intrusive.

Two minor suggestions: pin the third-party action to a commit SHA for supply-chain security, and review whether pull-requests: write permission is necessary.

Note: CLA must be signed before this PR can be merged.


Automated review by github-manager-bot

scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Security] Third-party action pinned to mutable tag @v0. Best practice is to pin to a full commit SHA to prevent supply-chain attacks (the tag can be force-pushed to a different commit). Consider using - uses: trustabl/trustabl-action@<commit-sha> instead. Additionally, v0 indicates pre-1.0 — breaking changes may occur without notice.

contents: read
security-events: write
pull-requests: write

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Permissions] pull-requests: write is broader than needed for a read-only scanner. If the action only posts SARIF results, security-events: write suffices. If it posts PR comments, this is justified but worth documenting why.

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.

3 participants