@codyswann/lisa 4.27.3 → 4.27.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/cdk/create-only/.github/workflows/ci.yml +79 -4
  2. package/dist/core/nightly-e2e-guard-behavior-certificate.js +2 -2
  3. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  4. package/dist/core/upstream-evidence-manifest.js +3 -1
  5. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  6. package/package.json +3 -3
  7. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  8. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  9. package/plugins/lisa-agy/plugin.json +1 -1
  10. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  11. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  12. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  13. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  14. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  15. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  16. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  17. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  19. package/plugins/lisa-expo-agy/plugin.json +1 -1
  20. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  21. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  22. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  23. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  24. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  25. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  26. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  27. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  29. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  30. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  34. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  35. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  36. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  38. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  39. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  40. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  42. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-rails-agy/plugin.json +1 -1
  45. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  49. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  50. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  52. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  54. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  55. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
@@ -18,9 +18,17 @@ jobs:
18
18
  cdk_env: ${{ steps.env.outputs.cdk_env }}
19
19
  aws_account_id: ${{ steps.env.outputs.aws_account_id }}
20
20
  role_arn: ${{ steps.env.outputs.role_arn }}
21
+ role_name: ${{ steps.env.outputs.role_name }}
21
22
  steps:
22
23
  - name: 🔄 Set environment
23
24
  id: env
25
+ env:
26
+ # Non-secret REPOSITORY VARIABLE (Settings → Variables), not a secret
27
+ # — a role name is not sensitive and secrets are unreadable when you
28
+ # need to debug this. Read through `env:` rather than interpolated
29
+ # straight into the shell below, because `${{ vars.* }}` pasted into a
30
+ # `run:` body is a script-injection seam.
31
+ CDK_CI_READ_ONLY_ROLE_NAME: ${{ vars.CDK_CI_READ_ONLY_ROLE_NAME }}
24
32
  run: |
25
33
  # For workflow dispatch, use the input
26
34
  if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
@@ -48,25 +56,72 @@ jobs:
48
56
 
49
57
  echo "environment=$TARGET_ENV" >> $GITHUB_OUTPUT
50
58
 
59
+ # ─────────────────────────────────────────────────────────────────
60
+ # Pick the AWS identity by TRIGGER, not by environment.
61
+ #
62
+ # This job only READS — cdk synth, cdk diff, unit tests — so a pull
63
+ # request must not be able to obtain deploy credentials. GitHub emits
64
+ # the SAME OIDC subject for every pull request no matter which branch
65
+ # it targets:
66
+ #
67
+ # pull_request -> repo:<owner>/<repo>:pull_request
68
+ # workflow_dispatch -> repo:<owner>/<repo>:ref:refs/heads/<branch>
69
+ #
70
+ # Because this workflow maps base branch -> account, a deploy role
71
+ # used here has to trust `...:pull_request` in EVERY account this
72
+ # repo validates against, production included. Anyone who can open a
73
+ # pull request could then assume the production deploy role.
74
+ #
75
+ # ⚠️ Do NOT collapse this to a single role. The branch is the whole
76
+ # point. A read-only role whose trust policy admits only the
77
+ # `pull_request` subject will REFUSE the `ref:refs/heads/<branch>`
78
+ # subject that workflow_dispatch presents, and the failure is opaque:
79
+ #
80
+ # Not authorized to perform sts:AssumeRoleWithWebIdentity
81
+ #
82
+ # with nothing in it naming the subject that was rejected. You would
83
+ # only discover it the day you reach for the manual-dispatch path.
84
+ #
85
+ # To adopt the least-privileged default, create a role (default name
86
+ # CiReadOnlyServiceRole) in each account, with:
87
+ # - a trust policy on the GitHub OIDC provider whose
88
+ # token.actions.githubusercontent.com:sub condition is
89
+ # repo:<owner>/<repo>:pull_request
90
+ # - read-only permissions, plus whatever the CDK bootstrap lookup
91
+ # role needs for `cdk synth` / `cdk diff`.
92
+ # Name it something else? Set the repository VARIABLE
93
+ # CDK_CI_READ_ONLY_ROLE_NAME. Haven't provisioned it yet? Set that
94
+ # same variable to DeployServiceRole — behaviour is then identical to
95
+ # a repo scaffolded before this seam existed, and nothing here breaks.
96
+ # ─────────────────────────────────────────────────────────────────
97
+ if [ "${{ github.event_name }}" == "pull_request" ]; then
98
+ ROLE_NAME="${CDK_CI_READ_ONLY_ROLE_NAME:-CiReadOnlyServiceRole}"
99
+ else
100
+ ROLE_NAME="DeployServiceRole"
101
+ fi
102
+
103
+ echo "role_name=$ROLE_NAME" >> $GITHUB_OUTPUT
104
+
51
105
  # Map to CDK environment name.
52
106
  # Set your per-environment AWS account IDs as repository or environment
53
107
  # secrets: AWS_ACCOUNT_ID_PRODUCTION / AWS_ACCOUNT_ID_STAGING / AWS_ACCOUNT_ID_DEV.
54
- # The deploy role name defaults to DeployServiceRole; change it below if yours differs.
108
+ # The role name comes from the trigger-based selection above — do not
109
+ # hardcode one here, or the pull-request narrowing is silently undone.
55
110
  case $TARGET_ENV in
56
111
  production)
57
112
  echo "cdk_env=production" >> $GITHUB_OUTPUT
58
113
  echo "aws_account_id=${{ secrets.AWS_ACCOUNT_ID_PRODUCTION }}" >> $GITHUB_OUTPUT
59
- echo "role_arn=arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID_PRODUCTION }}:role/DeployServiceRole" >> $GITHUB_OUTPUT
114
+ echo "role_arn=arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID_PRODUCTION }}:role/$ROLE_NAME" >> $GITHUB_OUTPUT
60
115
  ;;
61
116
  staging)
62
117
  echo "cdk_env=staging" >> $GITHUB_OUTPUT
63
118
  echo "aws_account_id=${{ secrets.AWS_ACCOUNT_ID_STAGING }}" >> $GITHUB_OUTPUT
64
- echo "role_arn=arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID_STAGING }}:role/DeployServiceRole" >> $GITHUB_OUTPUT
119
+ echo "role_arn=arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID_STAGING }}:role/$ROLE_NAME" >> $GITHUB_OUTPUT
65
120
  ;;
66
121
  dev|*)
67
122
  echo "cdk_env=dev" >> $GITHUB_OUTPUT
68
123
  echo "aws_account_id=${{ secrets.AWS_ACCOUNT_ID_DEV }}" >> $GITHUB_OUTPUT
69
- echo "role_arn=arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID_DEV }}:role/DeployServiceRole" >> $GITHUB_OUTPUT
124
+ echo "role_arn=arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID_DEV }}:role/$ROLE_NAME" >> $GITHUB_OUTPUT
70
125
  ;;
71
126
  esac
72
127
 
@@ -104,6 +159,26 @@ jobs:
104
159
  role-session-name: cdk-ci-checks
105
160
  aws-region: us-east-1
106
161
 
162
+ - name: 🪪 Verify assumed identity
163
+ id: verify_identity
164
+ env:
165
+ EXPECTED_ROLE: ${{ needs.determine_environment.outputs.role_name }}
166
+ run: |
167
+ # Every remaining step in this job only reads, so a silent revert to
168
+ # the deploy role would pass all of them. Without this assertion the
169
+ # over-privilege regression is invisible. sts:GetCallerIdentity needs
170
+ # no IAM permissions at all, so it works under the read-only role.
171
+ CALLER_ARN="$(aws sts get-caller-identity --query Arn --output text)"
172
+ case "${CALLER_ARN}" in
173
+ *":assumed-role/${EXPECTED_ROLE}/"*)
174
+ echo "✅ assumed ${EXPECTED_ROLE}"
175
+ ;;
176
+ *)
177
+ echo "::error::Expected to assume ${EXPECTED_ROLE}, but the caller identity is ${CALLER_ARN}"
178
+ exit 1
179
+ ;;
180
+ esac
181
+
107
182
  - name: 📋 CDK Synth
108
183
  run: |
109
184
  echo "🔍 Running CDK synth for ${{ needs.determine_environment.outputs.environment }} environment..."
@@ -20,9 +20,9 @@ export const NIGHTLY_E2E_GUARD_BEHAVIOR_CERTIFICATES = Object.freeze({
20
20
  }),
21
21
  "312e8962e21be2f3c6c6c0235b0c6159b8dc39425508b4965c7df87fb1333380": Object.freeze({
22
22
  contractVersion: "1.9.0",
23
- packageVersions: Object.freeze(["4.27.3"]),
23
+ packageVersions: Object.freeze(["4.27.4"]),
24
24
  provenances: Object.freeze([
25
- "workspace package @codyswann/lisa@4.27.3 (typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs)",
25
+ "workspace package @codyswann/lisa@4.27.4 (typescript/copy-overwrite/scripts/check-nightly-e2e-health.mjs)",
26
26
  ]),
27
27
  }),
28
28
  "898ee0247806c7aa6e98328662d80bcff22ff067999298865462a58daef8bb22": Object.freeze({
@@ -1 +1 @@
1
- {"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA08EpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CA04PjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
1
+ {"version":3,"file":"upstream-evidence-manifest.d.ts","sourceRoot":"","sources":["../../src/core/upstream-evidence-manifest.ts"],"names":[],"mappings":"AACA,iFAAiF;AACjF,eAAO,MAAM,0BAA0B,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA08EpE,CAAC;AAEL,4EAA4E;AAC5E,eAAO,MAAM,yBAAyB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CA44PjE,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAk6I/D,CAAC"}
@@ -56,7 +56,7 @@ export const UPSTREAM_EVIDENCE_MANIFEST = Object.freeze({
56
56
  "cdk/copy-overwrite/tsconfig.json": "bd960df819bb1ce01163ac4b28721eea3f07d482f6c454cfea9a8dc90191033a",
57
57
  "cdk/copy-overwrite/vitest.cdk.ts": "030158b11bec4f10b39585feb98f498981f307faa1fa314c7522e6def5d73c94",
58
58
  "cdk/copy-overwrite/vitest.config.ts": "c7f309d4f43d9188b9c067cb4900b2bdbacfbd28d135a6a2e6313cb0a37b030f",
59
- "cdk/create-only/.github/workflows/ci.yml": "98bd4b784a5a0a96bedc40c209f5bf5afe97fa422c200533d4544990a69a5c1a",
59
+ "cdk/create-only/.github/workflows/ci.yml": "2cb902c76ebd5235c8152f1fa0f2caae3a20a409ac0da747d19d29185047a418",
60
60
  "cdk/create-only/.github/workflows/deploy.yml": "f32ec7eecc7451812213fc66f1a6fa4b360137c586d47ede06747f04eb557251",
61
61
  "cdk/create-only/cdk.json": "f89030d8fe145a1dbabd59d89ddee4e16984f222d737f7fcf6b778d911e9fe40",
62
62
  "cdk/create-only/tsconfig.local.json": "d26253827e21fd7c41d30565fe3d339675f119e00bb24c5713a01f57ccd06602",
@@ -7836,6 +7836,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
7836
7836
  "tests/integration/apply-reports-unchanged-manifest.test.ts": true,
7837
7837
  "tests/integration/apply-unattended-preserves-host-config.test.ts": true,
7838
7838
  "tests/integration/bootstrap-keychain.test.ts": true,
7839
+ "tests/integration/cdk-ci-role-selection.test.ts": true,
7839
7840
  "tests/integration/cli-smoke.test.ts": true,
7840
7841
  "tests/integration/coverage-scratch-debris.test.ts": true,
7841
7842
  "tests/integration/deletion-reference-guard.test.ts": true,
@@ -7946,6 +7947,7 @@ export const UPSTREAM_SURFACE_MANIFEST = Object.freeze({
7946
7947
  "tests/integration/standards-proof-tamper.test.ts": true,
7947
7948
  "tests/integration/standards-proof-timeout.test.ts": true,
7948
7949
  "tests/integration/standards-proof-typescript.test.ts": true,
7950
+ "tests/integration/support/cdk-ci-role-selection-harness.ts": true,
7949
7951
  "tests/integration/support/maestro-android-retry-fixtures.ts": true,
7950
7952
  "tests/integration/support/maestro-android-retry-harness.ts": true,
7951
7953
  "tests/integration/support/maestro-build-step-harness.ts": true,