Skip to content

Harden CI: Artifactory OIDC, fork-aware workflows, pub.dev Trusted Publishing - #210

Open
MichaelGHSeg wants to merge 2 commits into
mainfrom
ci/harden-build-publish
Open

Harden CI: Artifactory OIDC, fork-aware workflows, pub.dev Trusted Publishing#210
MichaelGHSeg wants to merge 2 commits into
mainfrom
ci/harden-build-publish

Conversation

@MichaelGHSeg

Copy link
Copy Markdown
Contributor

Summary

  • Artifactory OIDC composite action — exchanges GitHub OIDC JWT for an Artifactory token, sets PUB_HOSTED_URL to route pub resolution through virtual-pub-thirdparty on twilio.jfrog.io; provider name github-actions-segmentio; follows same pattern as other Analytics SDKs
  • Hardened CI (ci.yml replaces analytics_flutter.yml): SHA-pinned actions, fork-aware runner (ubuntu-latest for forks, ubuntu-x64 for same-repo), least-privilege permissions block, workflow_dispatch, all-checks sentinel job, test matrix covers all 7 packages (core + 6 plugins)
  • Publish workflow (publish.yml): pub.dev Trusted Publishing via dart pub publish --force with OIDC (id-token: write), environment: production gate, pre-publish test job
  • Removed curl | bash codecov step (supply chain risk)
  • Removed Jira auto-ticket workflow (not needed)

Pre-requisites before this workflow can run

  • vars.ARTIFACTORY_URL must be set as a repository variable (https://twilio.jfrog.io)
  • subosito/flutter-action must be in the segmentio org actions allowlist (if not already present)
  • pub.dev Trusted Publisher registration needed on pub.dev for each package (segment_analytics + 6 plugins) pointing to this repo + publish.yml workflow + environment: production
  • Artifactory admin must confirm github-actions-segmentio OIDC principal has read on virtual-pub-thirdparty

…h workflow

- Add Artifactory OIDC composite action (virtual-pub-thirdparty, github-actions-segmentio)
- Replace analytics_flutter.yml with ci.yml: SHA-pinned actions, fork-aware runner,
  least-privilege permissions, workflow_dispatch, all-checks sentinel, expand test
  matrix to cover all 6 plugins (not just core), remove curl|bash codecov step
- Add publish.yml: pub.dev Trusted Publishing via OIDC (dart pub publish --force),
  environment: production gate, pre-publish test job, workflow_dispatch for manual runs
- Fix create_jira.yml: SHA-pin all 3 actions, add permissions block, remove unused secrets
Not needed for this repo.
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.

1 participant