mirror of
https://github.com/floci-io/floci.git
synced 2026-11-24 06:20:24 -05:00
* refactor(rds): read and check ARNs through AwsArnUtils
RdsQueryHandler read the region of an instance ARN and rebuilt its subnet
group ARN by splitting it; those now use regionOrDefault and parse, and the
service-local regionFromRdsArn copy is gone. Six startsWith("arn:") probes in
RdsService become isArn where the result is the same for every input: replica
link names Floci stored itself, the instance and cluster list filters, the
tag-resource region default and the cluster lookup by reference.
The seven other probes stay. They treat any value starting with arn: as an
attempted ARN, so a malformed one gets InvalidParameterValue (or its own not
found error); isArn would send it down the identifier path and change the
error.
No behaviour change. The partition baseline drops from 144 to 136.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
* refactor(cloudformation): check ARNs through AwsArnUtils
Seven startsWith("arn:") probes become AwsArnUtils.isArn where the result is
the same for every input: the deleted-stack and live-stack lookups by ARN,
where a malformed ARN resolves to no stack either way; the change set ARN
check that only runs after resolveChangeSetName has rejected malformed ARNs;
and the Batch, Bedrock AgentCore and IAM policy provisioners' checks of
physical ids Floci minted itself.
The six other probes stay: DeleteChangeSet, DeleteStack, the change set name
resolver and the change set's stack lookup give a malformed ARN its own
ValidationError or no-op, and the EC2 instance and ECS provisioners read
template values, where isArn would change how an "arn:" value resolves.
No behaviour change. The partition baseline drops from 136 to 129.
Signed-off-by: Hector Ventura <hectorvent@gmail.com>
---------
Signed-off-by: Hector Ventura <hectorvent@gmail.com>