Repository navigation
Conversation
This was referenced Nov 1, 2026
kddejong
approved these changes
Nov 3, 2026
The Task state Resource pattern in the Step Functions definition schema required arn:aws:, so a Lambda or activity ARN in any other partition was reported by E3601. The same ARN was reported by the resolved-value rules: W1031 and W1032 for Fn::Sub and Fn::Join built from AWS::Partition in China and GovCloud, and W1034 and W1035 for a literal reached through Fn::FindInMap or Fn::Select. Use the aws* partition group the IAM schemas already use. Signed-off-by: Brenden Hogan <hoganbr@amazon.com>
kddejong
force-pushed
the
fix/e3601-task-resource-partitions
branch
from
November 3, 2026 19:29
169608f to
ae400eb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4978 +/- ##
=======================================
Coverage 94.74% 94.74%
=======================================
Files 441 441
Lines 16142 16142
Branches 3140 3140
=======================================
Hits 15293 15293
Misses 469 469
Partials 380 380
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: Fixes #4977
Description of changes:
The Task state
Resourcepattern indata/schemas/other/step_functions/statemachine.jsonstarts with^arn:aws:, so a Task ARN from any other partition is rejected:reports E3601 on
LiteralArnonmainin every region.SubArnreports W1031 when linted forcn-north-1orus-gov-west-1, becauseAWS::Partitionresolves toaws-cnoraws-us-govthere.The pattern now starts with
^arn:aws[A-Za-z\-]*?:, the partition groupAwsArnindata/schemas/other/iam/policy.jsonand E3514's resource ARN pattern already use. The rest of the pattern is unchanged.Reach. The pattern applies only to Task state
Resourcevalues in aDefinitionorDefinitionString(E3601), including aRefto a parameter whose default is such an ARN (reported at the default), and to the same values resolved by the resolved-value rules W1031 (Fn::Sub), W1032 (Fn::Join), W1034 (Fn::FindInMap) and W1035 (Fn::Select). It only accepts more values, so it can only remove findings.Verification.
test_state_machine_definition.pycases: Task ARNs inaws-cnandaws-eusc(including a:$LATESTqualifier) are accepted, and anarn:azure:Task ARN is still rejected with the pattern error. Theaws-cn/aws-eusccase fails onmain. Two existing cases quote the pattern in their expected messages and are updated to the new pattern text.LiteralArnonmainin every region, and W1031 onSubArnincn-north-1andus-gov-west-1. Silent with this change.pytest test,pytest -m data test/integration/test_data_file_format.pyandpre-commit run --all-filespass.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.