Skip to content

[Integration test — do not merge] Review finding status persistence - #86

Draft
homanp wants to merge 1 commit into
mainfrom
codex/test-pr-status-baseline
Draft

homanp wants to merge 1 commit into
mainfrom
codex/test-pr-status-baseline

Conversation

@homanp

@homanp homanp commented Nov 10, 2026 •

Copy link
Copy Markdown

DO NOT MERGE — isolated Superagent Security Graph integration fixture.

Reproduces the same six-line workflow change used for the status-memory tests. The default branch remains unchanged.

Result: Baseline detected and published one privileged-workflow finding. Its API/MCP status transitions and native API review comment were verified in live graph context. The fixture is restored to accepted risk after testing.

Returned to draft after the test; no production changes are intended. App implementation: https://github.com/superagent-ai/app/pull/927. MCP implementation: superagent-ai/security-graph#17.

@github-actions github-actions Bot added the size/XS PR size: XS label Nov 10, 2026
@github-actions

Copy link
Copy Markdown

Thank you @homanp for contributing once again!

📊 PR overview

Files changed Additions Deletions Size
1 +6 -0 XS

📝 Before review

To help maintainers review your changes efficiently, please ensure that:

  • The PR description clearly explains what was changed and why
  • The PR checklist has been filled out
  • All existing tests continue to pass
  • New tests have been added for any new functionality

📖 Please review our Contributing Guidelines and Code of Conduct.

✅ Continuous Integration

Two CI workflows will run automatically on this PR:

  • Code Quality — linting and formatting checks
  • Exploitation Tests — ensures vulnerabilities and flags work as expected

You can follow their progress in the Checks tab.

🤝 A note on collaboration

We value respectful and constructive interactions. Whether you are a contributor or a reviewer, please be patient, kind, and open to feedback.


A maintainer will review your changes as soon as possible. If you have any questions, feel free to ask in this thread.

kOaDT

@superagent-security-dev superagent-security-dev 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.

Superagent found 1 security concern(s).

with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Prepare PR welcome assets
run: npm ci

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P0: Privileged pull_request_target executes pull-request-controlled installation code

pull_request_target checks out the PR head and runs npm ci, executing author-controlled lifecycle code with write-scoped token access.

Remove PR-head checkout/npm ci, or run them only in read-only pull_request; disable checkout credential persistence.

AI prompt
Check if this security scanner issue is valid. If so, understand the root cause and fix it. If appropriate, update or add tests. Keep the change focused and preserve intended behavior.

<file name=".github/workflows/welcome-pr.yml">
<violation number="1" location=".github/workflows/welcome-pr.yml:21">
<priority>P0</priority>
<title>Privileged pull_request_target executes pull-request-controlled installation code</title>
<evidence>The added checkout at lines 15-19 selects github.event.pull_request.head.sha, which is controlled by the pull-request author, and the added npm ci at line 21 installs that tree. npm executes package lifecycle hooks during installation; this repository's checked-in package.json defines a prepare script (prepare: husky), and the dependency graph can also contain install-time scripts. The job runs on pull_request_target and retains pull-requests: write and issues: write permissions from lines 4-9. actions/checkout does not disable persisted credentials. Thus PR-controlled code can execute on the privileged runner and access the writable workflow token. The base workflow only ran the pinned github-script action and did not check out or install PR contents.</evidence>
<recommendation>Do not check out or install the PR head in this pull_request_target workflow. Remove both added steps, or move untrusted validation to a separate pull_request workflow with read-only permissions and no secrets. If trusted welcome assets are required, check out an explicit trusted base/default-branch revision without installing dependencies, and set persist-credentials: false unless credential persistence is required.</recommendation>
</violation>
</file>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant