-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: notice for https://github.com/aws/aws-cdk/issues/25674 #210
Conversation
"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": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These only suffer from the default masters role.
"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": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These suffer from both the default masters role and the creation role
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')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using 2
as the range wouldn't allow pre releases, and we still have customers using those...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
> semver.satisfies('2.0.0-rc.2', '>=2.0.0-rc.1 <2.80.0')
true
> semver.satisfies('2.0.0-rc.2', '^2.0.0 <2.80.0')
false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what we're trying to convey here is that:
- A range may not cross a major version boundary (if we use
>=
we must also have a<
) - A range must be bounded at the top (if we use
^
we must also have a<
)
Maybe it would be simpler to do the following:
- Do a linear scan of version ranges
x ∈ [1..10]
, testx.0.0
andx.10000.0
and make sure not more than onex
is within the range - Of that same
x
, testx.10000.0
and test that it is not matched.
Potentially a simpler set of tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potentially, I honestly don't have the mental capacity right now to rework this...
Co-authored-by: Rico Hermans <[email protected]>
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.