Skip to content

fix(ci): harden generated import workflow - #201

Merged
jgpruitt merged 2 commits into
mainfrom
jgpruitt/me-ci-integration
Aug 5, 2026
Merged

fix(ci): harden generated import workflow#201
jgpruitt merged 2 commits into
mainfrom
jgpruitt/me-ci-integration

Conversation

@jgpruitt

@jgpruitt jgpruitt commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • restore explicit contents: read permission in generated CI workflows
  • prevent actions/checkout from persisting its GitHub token after checkout
  • add workflow-rendering regression coverage

Validation

  • ./bun test packages/cli/commands/project-ci.test.ts
  • ./bun run check

Fixes TNT-230.

Copilot AI review requested due to automatic review settings August 5, 2026 21:25
@jgpruitt jgpruitt self-assigned this Aug 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR hardens the GitHub Actions workflow generated by me ci install (Memory Engine CLI) to reduce token exposure and to avoid relying on GitHub’s default workflow permissions, and adds regression tests to ensure the rendered workflow stays hardened.

Changes:

  • Add an explicit workflow-level permissions: contents: read block to generated import workflows.
  • Disable actions/checkout credential persistence via persist-credentials: false.
  • Extend workflow-rendering tests to assert both hardening measures, and update the repo’s checked-in me-import.yml accordingly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
packages/cli/commands/project-ci.ts Updates the workflow template rendered by me ci install to set explicit permissions and disable checkout credential persistence.
packages/cli/commands/project-ci.test.ts Adds assertions to lock in the workflow hardening behavior as regression coverage.
.github/workflows/me-import.yml Applies the newly hardened settings to this repo’s import workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jgpruitt
jgpruitt merged commit dc1533e into main Aug 5, 2026
7 checks passed
@jgpruitt
jgpruitt deleted the jgpruitt/me-ci-integration branch August 5, 2026 21:45
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.

2 participants