Skip to content

Commit

Permalink
chore: notice for aws/aws-cdk#25674 (#210)
Browse files Browse the repository at this point in the history
Since there are two separate problems, introduced in two separate commits, issue two notices based on the affeceted versions. Note that we have no way of knowing if customers are actually impacted by the default masters role because we don't know if they pass the `mastersRole` property or not.
  • Loading branch information
iliapolo authored May 23, 2023
1 parent 2b001ec commit e1bcd21
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
40 changes: 40 additions & 0 deletions data/notices.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,46 @@
}
],
"schemaVersion": "1"
},
{
"title": "(eks) eks overly permissive trust policies",
"issueNumber": 25674,
"overview": "The default MastersRole allows any identity in the account with the appropriate sts:AssumeRole permissions to assume it.",
"components": [
{
"name": "@aws-cdk/aws-eks.Cluster",
"version": ">=1.57.0 <1.62.0"
},
{
"name": "@aws-cdk/aws-eks.FargateCluster",
"version": ">=1.57.0 <1.62.0"
}
],
"schemaVersion": "1"
},
{
"title": "(eks) eks overly permissive trust policies",
"issueNumber": 25674,
"overview": "Cluster CreationRole and default MastersRole allows any identity in the account with the appropriate sts:AssumeRole permissions to assume it.",
"components": [
{
"name": "@aws-cdk/aws-eks.Cluster",
"version": ">=1.62.0 <1.202.0"
},
{
"name": "@aws-cdk/aws-eks.FargateCluster",
"version": ">=1.62.0 <1.202.0"
},
{
"name": "aws-cdk-lib.aws_eks.Cluster",
"version": ">=2.0.0-rc.1 <2.80.0"
},
{
"name": "aws-cdk-lib.aws_eks.FargateCluster",
"version": ">=2.0.0-rc.1 <2.80.0"
}
],
"schemaVersion": "1"
}
]
}
3 changes: 2 additions & 1 deletion test/schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ describe('Notices file is valid', () => {
test('v2 version ranges must be bounded at the bottom', () => {
for (const component of notice.components) {
if (component.version === '1.*') { continue; } // Special range that we allow
if (semver.intersects(component.version, '2') && !semver.subset(component.version, '2')) {
if (semver.intersects(component.version, '2', { includePrerelease: true })
&& !semver.subset(component.version, '2', { includePrerelease: true })) {
throw new Error(`${component.version} should have an upper bound in v1 range, or a lower bound in v2 range (version should look like "^2.3.4 <2.5.6")`);
}
}
Expand Down

0 comments on commit e1bcd21

Please sign in to comment.