Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/06153ed3-a241-400b-9414-3dc304516475 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… artifact support Agent-Logs-Url: https://github.com/github/gh-aw/sessions/06153ed3-a241-400b-9414-3dc304516475 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
… artifact support Agent-Logs-Url: https://github.com/github/gh-aw/sessions/06153ed3-a241-400b-9414-3dc304516475 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot keep working |
|
@copilot remove "enabled: true" |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/e2c3d991-4ccd-4c47-8a7b-53d9905e1444 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Addressed the remaining code review feedback (consolidating split template literals into single template literals in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/8dce883a-59fd-437b-a8ba-9dc9587acc98 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot use runner_temp env var like other temp folders |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/05ddc6f7-ae5e-4faa-9423-6f551a67af06 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in
Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot update smoke-copilot to upload the gh-aw binary as artifact using the safe output and set a 1 day retention, skip-artifact. |
…load_artifact job permissions and duplicate step bug Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c901fdd4-ee9b-47d2-a4e6-ebe13975e3a4 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in
Also fixed two bugs found during testing: the Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot creation of artifacts does not require actions: write since it uses this secret: ACTIONS_RUNTIME_TOKEN Review source code of @actions/upload-artifact for reference |
…TIME_TOKEN instead Agent-Logs-Url: https://github.com/github/gh-aw/sessions/4404709a-1bdd-4947-b526-9edf180e24cc Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
🤖 Smoke test run §24110244763: The upload-artifact safe output feature looks solid. Good design using ACTIONS_RUNTIME_TOKEN to avoid needing actions: write. Suggest pinning @actions/artifact to an exact version for reproducibility.
📰 BREAKING: Report filed by Smoke Copilot · ● 1.2M
| @@ -1,5 +1,6 @@ | |||
| { | |||
| "devDependencies": { | |||
| "@actions/artifact": "^6.0.0", | |||
There was a problem hiding this comment.
Consider pinning @actions/artifact to an exact version (e.g. 6.0.0) instead of ^6.0.0 for better supply-chain security and reproducibility. 🤖 Smoke test run §24110244763
| "gh-aw": patch | ||
| --- | ||
|
|
||
| Add an `upload-artifact` safe output type for run-scoped GitHub Actions artifact uploads, including frontmatter config, inline handler processing, staged file mounting, and shared workflow support. |
There was a problem hiding this comment.
Good changeset entry — the description concisely captures all key aspects of the upload-artifact feature. 🤖 Smoke test run §24110244763 confirms this is working correctly.
This comment has been minimized.
This comment has been minimized.
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
@copilot fix import instead require https://github.com/github/gh-aw/actions/runs/24110244763/job/70343555584#step:9:173 |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal!
Note
🔒 Integrity filter blocked 3 items
The following items were blocked because they don't meet the GitHub integrity level.
- #25186
list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved". - #25185
list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved". - #25180
list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".
To allow these resources, lower min-integrity in your GitHub frontmatter:
tools:
github:
min-integrity: approved # merged | approved | unapproved | none💥 [THE END] — Illustrated by Smoke Claude · ● 318.2K
| description: 'Install @actions/github for handlers that use a per-handler github-token (creates Octokit via getOctokit)' | ||
| required: false | ||
| default: 'false' | ||
| safe-output-artifact-client: |
There was a problem hiding this comment.
The new safe-output-artifact-client input is well-named and follows the existing pattern of optional boolean inputs. The default of 'false' ensures backward compatibility — no existing workflows need to be updated unless they want artifact upload support.
There was a problem hiding this comment.
🤖 Smoke test agent 24110635667 agrees — the safe-output-artifact-client boolean input pattern is clean and consistent with the codebase conventions.
📰 BREAKING: Report filed by Smoke Copilot · ● 1.7M
| version: "1.25" | ||
| safe-outputs: | ||
| allowed-domains: [default-safe-outputs] | ||
| upload-artifact: |
There was a problem hiding this comment.
Good defaults: max-uploads: 1, default-retention-days: 1, and max-retention-days: 1 are appropriately conservative for a smoke test workflow — just enough to validate the feature without accumulating artifact storage.
…upload_artifact handler Agent-Logs-Url: https://github.com/github/gh-aw/sessions/d43a1646-c12c-46d3-8803-cb939423efc5 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in |
|
🎬 THE END — Smoke Claude MISSION: ACCOMPLISHED! The hero saves the day! ✨ |
|
✨ The prophecy is fulfilled... Smoke Codex has completed its mystical journey. The stars align. 🌟 |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
✅ All tools validated successfully! Agent Container Smoke Test confirms agent container is ready. |
Agent Container Tool Check
Result: 12/12 tools available ✅ — PASS
|
|
Smoke test (Codex) run
|
|
🤖 Smoke test §24110635667 results for
Overall:
|
There was a problem hiding this comment.
Smoke test review for PR #25002. The upload_artifact handler is well-structured with solid security (path traversal prevention, symlink rejection, size validation). The injectable artifact client makes it testable. Good addition to the safe-output system.
📰 BREAKING: Report filed by Smoke Copilot · ● 1.7M
| const resolver = {}; | ||
|
|
||
| /** | ||
| * Per-message handler: processes one upload_artifact request. |
There was a problem hiding this comment.
The global.__createArtifactClient injection point is a clean testing seam — allows full handler testing without network calls. Consider documenting this pattern in the file header for future maintainers.
| files.push(path.relative(baseDir, fullPath)); | ||
| } else { | ||
| core.warning(`Skipping symlink: ${fullPath}`); | ||
| } |
There was a problem hiding this comment.
The isWithinRoot function correctly uses path.resolve() to canonicalize paths before comparing, which prevents path traversal attacks like ../../etc/passwd. This is a critical security check for user-supplied paths.
|
📰 VERDICT: Smoke Copilot has concluded. All systems operational. This is a developing story. 🎤 |
|
Smoke Test 24110635669 Results Core (#1–12): ✅✅✅✅✅✅✅✅✅✅✅✅ Overall: PARTIAL (tests #16 and #19 skipped)
|
There was a problem hiding this comment.
💥 Automated smoke test review - all systems nominal! This PR adds native artifact upload support as a safe output type. The implementation looks clean with proper staging, conservative defaults, and a well-structured shared workflow config.
💥 [THE END] — Illustrated by Smoke Claude · ● 305.9K
| description: 'Install @actions/github for handlers that use a per-handler github-token (creates Octokit via getOctokit)' | ||
| required: false | ||
| default: 'false' | ||
| safe-output-artifact-client: |
There was a problem hiding this comment.
Good addition of the safe-output-artifact-client input. The default false keeps the existing behavior unchanged, making this a clean, backward-compatible opt-in. Consider adding a brief note in the description about which specific handlers require this (i.e., upload_artifact.cjs) so callers know when to enable it.
| version: "1.25" | ||
| safe-outputs: | ||
| allowed-domains: [default-safe-outputs] | ||
| upload-artifact: |
There was a problem hiding this comment.
The upload-artifact safe-output config looks good with conservative defaults (max-uploads: 1, 1-day retention for smoke tests). The allow.skip-archive: true setting is a nice optimization for single binary uploads. One suggestion: consider documenting why retention is set to 1 day here vs the 7-day default in the shared config — helps future maintainers understand the intentional difference.
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/1955c5ca-a0aa-465b-b360-54bc4b0934f0 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in |
Adds a new
upload-artifactsafe output type that lets AI agents declaratively request GitHub Actions artifact uploads — distinct from the existingupload-asset(git orphan branch) path. Returns a temporary opaque artifact ID rather than a raw download URL, keeping authorization and auditing centralized.Design
The model stages files to
$RUNNER_TEMP/gh-aw/safeoutputs/upload-artifacts/and emitsupload_artifactrecords. Thesafe_outputsjob runs theupload_artifacthandler inline in the unified handler loop (same as all other safe output types). The handler uploads approved files directly via the@actions/artifactREST API client (DefaultArtifactClient.uploadArtifact()) — no compiled YAML slot steps and no separate standalone job required.Temporary IDs use the format
tmp_artifact_<26 uppercase alphanumeric chars>and are written to a resolver file for downstream steps.All staging and resolver paths use
process.env.RUNNER_TEMPin JavaScript — consistent with all other temp folders in the codebase.No special workflow permissions are required —
@actions/artifactauthenticates viaACTIONS_RUNTIME_TOKENwhich is automatically available to the runner.The staging directory (
$RUNNER_TEMP/gh-aw/safeoutputs/upload-artifacts/) is pre-created before the agent starts and mounted read-write into the agent container, overriding the parent:romount so the agent can stage files without silent failures.Front matter
The feature is enabled simply by including the
upload-artifact:section (noenabled: truerequired — same pattern asupload-asset):It can also be enabled via import from the new shared workflow:
Output payload (model-emitted)
{ "type": "upload_artifact", "path": "dist/report.json", "retention_days": 14 } { "type": "upload_artifact", "filters": { "include": ["reports/**/*.json"], "exclude": ["reports/private/**"] } } { "type": "upload_artifact", "path": "dist/app.bin", "skip_archive": true }Changes
pkg/workflow/publish_artifacts.go—UploadArtifactConfig(withArtifactFiltersConfig,ArtifactDefaultsConfig,ArtifactAllowConfig), frontmatter parser, staging artifact upload step generatoractions/setup/js/upload_artifact.cjs— per-message handler:main(config)returns a handler function called once perupload_artifactmessage; handles path/filter resolution against staging dir, allowed-paths policy, skip-archive single-file constraint, size validation, direct upload viaDefaultArtifactClient.uploadArtifact()(injectable viaglobal.__createArtifactClientfor tests), temp ID generation + resolver file writeactions/setup/action.yml— addedsafe-output-artifact-clientinput; whentrue, setup installs@actions/artifactinto the actions destination directorypkg/workflow/mcp_setup_generator.go— pre-creates the staging directory and adds a read-write--mountfor it so the agent container can write staged filespkg/workflow/awf_helpers.go— adds--mountforupload-artifactsstaging dir whenupload_artifactis configuredpkg/workflow/imports.go— addedupload-artifacttohasSafeOutputType()(conflict detection) andUploadArtifactpropagation tomergeSafeOutputConfig()so the tool can be imported from shared workflows.github/workflows/shared/safe-output-upload-artifact.md— new shared workflow file; import it to enableupload_artifactwith sensible defaults (max-uploads: 3, 7-day retention, allow skip-archive)smoke-copilot.md— updated to useupload-artifactsafe output and upload thegh-awbinary as a 1-day retention artifactChangeset
upload-artifactsafe output type for run-scoped GitHub Actions artifact uploads, including frontmatter/config support, inline handler processing, staging/mount wiring, and shared workflow import support.✨ PR Review Safe Output Test - Run 24107238119
✨ PR Review Safe Output Test - Run 24109101986
✨ PR Review Safe Output Test - Run 24110244779
Note
🔒 Integrity filter blocked 3 items
The following items were blocked because they don't meet the GitHub integrity level.
list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".list_pull_requests: has lower integrity than agent requires. The agent cannot read data with integrity below "approved".To allow these resources, lower
min-integrityin your GitHub frontmatter:✨ PR Review Safe Output Test - Run 24110635669