Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions .github/workflows/reusable-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ on:
fullsend_version:
required: false
type: string
default: 'latest'
default: "latest"
install_mode:
required: false
type: string
default: 'per-org'
default: "per-org"
fullsend_ai_ref:
description: Ref of fullsend-ai/fullsend to load actions from. Must match the ref used in the `uses:` line that calls this workflow.
type: string
required: false
default: v0
secrets:
FULLSEND_GCP_WIF_PROVIDER:
required: true
Expand All @@ -54,10 +59,14 @@ jobs:
uses: actions/checkout@v6
with:
repository: fullsend-ai/fullsend
ref: v0
ref: ${{ inputs.fullsend_ai_ref }}
path: .defaults
Comment thread
rh-hemartin marked this conversation as resolved.
fetch-depth: 1
sparse-checkout: |
.github/actions/
.github/scripts/
internal/scaffold/fullsend-repo/
action.yml

- name: Prepare workspace (upstream defaults + org/repo overrides)
env:
Expand Down Expand Up @@ -92,18 +101,17 @@ jobs:
done
mkdir -p .github/scripts
cp "${SRC}/.github/scripts/setup-agent-env.sh" .github/scripts/setup-agent-env.sh
rm -rf .defaults

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

HIGH — .defaults/ directory retained during agent execution, exposing full repo source

The rm -rf .defaults cleanup was removed (necessary for local action refs), but with sparse-checkout also removed, the entire fullsend-ai/fullsend repo — Go source, internal tooling, CI config, e2e tests, infrastructure code — now persists in the workspace during agent execution. Previously only internal/scaffold/fullsend-repo/ was present.

Suggestion: Add a cleanup step with if: always() after the agent run step:

- name: Cleanup upstream checkout
  if: always()
  run: rm -rf .defaults

GitHub Actions resolves uses: action paths at step execution time (not eagerly for the whole job), but the composite action at .defaults/ needs to exist when its step runs. The cleanup should go immediately after the "Run code agent" step. If that's not safe, at minimum prune non-essential directories before agent execution:

find .defaults -mindepth 1 -maxdepth 1 \
  ! -name 'action.yml' ! -name '.github' \
  -exec rm -rf {} +

Same pattern applies to all 5 stage workflows. Flagged by 6/7 agents.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Why should we delete the repository? It is publicly available.


- name: Validate enrollment and extract repo metadata
id: repo-parts
uses: fullsend-ai/fullsend/.github/actions/validate-enrollment@v0
uses: ./.defaults/.github/actions/validate-enrollment
with:
source_repo: ${{ inputs.source_repo }}
install_mode: ${{ inputs.install_mode }}

- name: Mint coder token
id: app-token
uses: fullsend-ai/fullsend/.github/actions/mint-token@v0
uses: ./.defaults/.github/actions/mint-token
with:
role: coder
repos: ${{ steps.repo-parts.outputs.name }}
Expand All @@ -127,7 +135,7 @@ jobs:
run: bash scripts/pre-code.sh

- name: Setup GCP and prepare credentials
uses: fullsend-ai/fullsend/.github/actions/setup-gcp@v0
uses: ./.defaults/.github/actions/setup-gcp
with:
gcp_wif_provider: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
gcp_project_id: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
Expand All @@ -143,7 +151,7 @@ jobs:
run: bash .github/scripts/setup-agent-env.sh

- name: Run code agent
uses: fullsend-ai/fullsend@v0
uses: ./.defaults/
env:
GITHUB_ISSUE_URL: ${{ fromJSON(inputs.event_payload).issue.html_url }}
ISSUE_NUMBER: ${{ fromJSON(inputs.event_payload).issue.number }}
Expand Down
34 changes: 19 additions & 15 deletions .github/workflows/reusable-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
# Flow: shim (per-repo) → reusable-dispatch.yml → reusable-{stage}.yml
# Nesting: 3 levels of workflow_call (within GitHub's 4-level limit)
#
# Stage workflows are referenced with relative paths (./.github/workflows/...)
# so a pinned caller (e.g. @v0.10.1) resolves them at that exact tag with
# no hardcoded version strings.
#
# Security: all user-controlled inputs (comment body, labels, usernames)
# are passed via env: variables, not interpolated in run: blocks.
name: Dispatch
Expand Down Expand Up @@ -35,6 +39,11 @@ on:
required: false
type: string
default: "latest"
fullsend_ai_ref:
description: Ref of fullsend-ai/fullsend to load actions from. Must match the ref used in the `uses:` line that calls this workflow.
type: string
required: false
default: v0
secrets:
FULLSEND_GCP_WIF_PROVIDER:
required: false
Expand Down Expand Up @@ -324,94 +333,89 @@ jobs:
name: Triage
needs: route
if: needs.route.outputs.stage == 'triage'
uses: fullsend-ai/fullsend/.github/workflows/reusable-triage.yml@v0
uses: ./.github/workflows/reusable-triage.yml
with:
event_type: ${{ github.event_name }}
source_repo: ${{ github.repository }}
event_payload: ${{ needs.route.outputs.event_payload }}
install_mode: ${{ inputs.install_mode }}
mint_url: ${{ inputs.mint_url }}

gcp_region: ${{ inputs.gcp_region }}
fullsend_version: ${{ inputs.fullsend_version }}
fullsend_ai_ref: ${{ inputs.fullsend_ai_ref }}
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}

FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}

code:
name: Code
needs: route
if: needs.route.outputs.stage == 'code'
uses: fullsend-ai/fullsend/.github/workflows/reusable-code.yml@v0
uses: ./.github/workflows/reusable-code.yml
with:
event_type: ${{ github.event_name }}
source_repo: ${{ github.repository }}
event_payload: ${{ needs.route.outputs.event_payload }}
install_mode: ${{ inputs.install_mode }}
mint_url: ${{ inputs.mint_url }}

gcp_region: ${{ inputs.gcp_region }}
fullsend_version: ${{ inputs.fullsend_version }}
fullsend_ai_ref: ${{ inputs.fullsend_ai_ref }}
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}

FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}

review:
name: Review
needs: route
if: needs.route.outputs.stage == 'review'
uses: fullsend-ai/fullsend/.github/workflows/reusable-review.yml@v0
uses: ./.github/workflows/reusable-review.yml
with:
event_type: ${{ github.event_name }}
source_repo: ${{ github.repository }}
event_payload: ${{ needs.route.outputs.event_payload }}
install_mode: ${{ inputs.install_mode }}
mint_url: ${{ inputs.mint_url }}

gcp_region: ${{ inputs.gcp_region }}
fullsend_version: ${{ inputs.fullsend_version }}
fullsend_ai_ref: ${{ inputs.fullsend_ai_ref }}
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}

FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}

fix:
name: Fix
needs: route
if: needs.route.outputs.stage == 'fix'
uses: fullsend-ai/fullsend/.github/workflows/reusable-fix.yml@v0
uses: ./.github/workflows/reusable-fix.yml
with:
event_type: ${{ github.event_name }}
source_repo: ${{ github.repository }}
event_payload: ${{ needs.route.outputs.event_payload }}
trigger_source: ${{ needs.route.outputs.trigger_source }}
install_mode: ${{ inputs.install_mode }}
mint_url: ${{ inputs.mint_url }}

gcp_region: ${{ inputs.gcp_region }}
fullsend_version: ${{ inputs.fullsend_version }}
fullsend_ai_ref: ${{ inputs.fullsend_ai_ref }}
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}

FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}

retro:
name: Retro
needs: route
if: needs.route.outputs.stage == 'retro'
uses: fullsend-ai/fullsend/.github/workflows/reusable-retro.yml@v0
uses: ./.github/workflows/reusable-retro.yml
with:
event_type: ${{ github.event_name }}
source_repo: ${{ github.repository }}
event_payload: ${{ needs.route.outputs.event_payload }}
install_mode: ${{ inputs.install_mode }}
mint_url: ${{ inputs.mint_url }}

gcp_region: ${{ inputs.gcp_region }}
fullsend_version: ${{ inputs.fullsend_version }}
fullsend_ai_ref: ${{ inputs.fullsend_ai_ref }}
secrets:
FULLSEND_GCP_WIF_PROVIDER: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}

FULLSEND_GCP_PROJECT_ID: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
26 changes: 17 additions & 9 deletions .github/workflows/reusable-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ on:
trigger_source:
required: true
type: string
description: 'GitHub username that triggered the fix; bot accounts end with [bot]'
description: "GitHub username that triggered the fix; bot accounts end with [bot]"
pr_number:
required: false
type: string
Expand All @@ -35,11 +35,16 @@ on:
fullsend_version:
required: false
type: string
default: 'latest'
default: "latest"
install_mode:
required: false
type: string
default: 'per-org'
default: "per-org"
fullsend_ai_ref:
description: Ref of fullsend-ai/fullsend to load actions from. Must match the ref used in the `uses:` line that calls this workflow.
type: string
required: false
default: v0
secrets:
FULLSEND_GCP_WIF_PROVIDER:
required: true
Expand All @@ -66,10 +71,14 @@ jobs:
uses: actions/checkout@v6
with:
repository: fullsend-ai/fullsend
ref: v0
ref: ${{ inputs.fullsend_ai_ref }}
path: .defaults
fetch-depth: 1
sparse-checkout: |
.github/actions/
.github/scripts/
internal/scaffold/fullsend-repo/
action.yml

- name: Prepare workspace (upstream defaults + org/repo overrides)
env:
Expand Down Expand Up @@ -104,18 +113,17 @@ jobs:
done
mkdir -p .github/scripts
cp "${SRC}/.github/scripts/setup-agent-env.sh" .github/scripts/setup-agent-env.sh
rm -rf .defaults

- name: Validate enrollment and extract repo metadata
id: repo-parts
uses: fullsend-ai/fullsend/.github/actions/validate-enrollment@v0
uses: ./.defaults/.github/actions/validate-enrollment
with:
source_repo: ${{ inputs.source_repo }}
install_mode: ${{ inputs.install_mode }}

- name: Mint coder token
id: app-token
uses: fullsend-ai/fullsend/.github/actions/mint-token@v0
uses: ./.defaults/.github/actions/mint-token
with:
role: coder
repos: ${{ steps.repo-parts.outputs.name }}
Expand Down Expand Up @@ -321,7 +329,7 @@ jobs:
run: bash scripts/pre-fix.sh

- name: Setup GCP and prepare credentials
uses: fullsend-ai/fullsend/.github/actions/setup-gcp@v0
uses: ./.defaults/.github/actions/setup-gcp
with:
gcp_wif_provider: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
gcp_project_id: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
Expand All @@ -341,7 +349,7 @@ jobs:
run: bash .github/scripts/setup-agent-env.sh

- name: Run fix agent
uses: fullsend-ai/fullsend@v0
uses: ./.defaults/
env:
PR_NUMBER: ${{ steps.context.outputs.pr_number }}
REPO_FULL_NAME: ${{ inputs.source_repo }}
Expand Down
24 changes: 16 additions & 8 deletions .github/workflows/reusable-retro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ on:
fullsend_version:
required: false
type: string
default: 'latest'
default: "latest"
install_mode:
required: false
type: string
default: 'per-org'
default: "per-org"
fullsend_ai_ref:
description: Ref of fullsend-ai/fullsend to load actions from. Must match the ref used in the `uses:` line that calls this workflow.
type: string
required: false
default: v0
secrets:
FULLSEND_GCP_WIF_PROVIDER:
required: true
Expand All @@ -52,10 +57,14 @@ jobs:
uses: actions/checkout@v6
with:
repository: fullsend-ai/fullsend
ref: v0
ref: ${{ inputs.fullsend_ai_ref }}
path: .defaults
fetch-depth: 1
sparse-checkout: |
.github/actions/
.github/scripts/
internal/scaffold/fullsend-repo/
action.yml

- name: Prepare workspace (upstream defaults + org/repo overrides)
env:
Expand Down Expand Up @@ -90,18 +99,17 @@ jobs:
done
mkdir -p .github/scripts
cp "${SRC}/.github/scripts/setup-agent-env.sh" .github/scripts/setup-agent-env.sh
rm -rf .defaults

- name: Validate enrollment and extract repo metadata
id: repo-parts
uses: fullsend-ai/fullsend/.github/actions/validate-enrollment@v0
uses: ./.defaults/.github/actions/validate-enrollment
with:
source_repo: ${{ inputs.source_repo }}
install_mode: ${{ inputs.install_mode }}

- name: Mint retro token
id: app-token
uses: fullsend-ai/fullsend/.github/actions/mint-token@v0
uses: ./.defaults/.github/actions/mint-token
with:
role: retro
repos: ${{ inputs.install_mode == 'per-repo' && steps.repo-parts.outputs.name || format('{0},.fullsend', steps.repo-parts.outputs.name) }}
Expand All @@ -117,7 +125,7 @@ jobs:
persist-credentials: false

- name: Setup GCP and prepare credentials
uses: fullsend-ai/fullsend/.github/actions/setup-gcp@v0
uses: ./.defaults/.github/actions/setup-gcp
with:
gcp_wif_provider: ${{ secrets.FULLSEND_GCP_WIF_PROVIDER }}
gcp_project_id: ${{ secrets.FULLSEND_GCP_PROJECT_ID }}
Expand All @@ -132,7 +140,7 @@ jobs:
run: bash .github/scripts/setup-agent-env.sh

- name: Run retro agent
uses: fullsend-ai/fullsend@v0
uses: ./.defaults/
env:
ORIGINATING_URL: ${{ fromJSON(inputs.event_payload).pull_request.html_url || fromJSON(inputs.event_payload).issue.html_url }}
RETRO_COMMENT: ${{ fromJSON(inputs.event_payload).comment.body || '' }}
Expand Down
Loading
Loading