-
-
Notifications
You must be signed in to change notification settings - Fork 277
Migrate Gentoo importer to advisory V2 #2090
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
base: main
Are you sure you want to change the base?
Conversation
77f89b8 to
7ef7684
Compare
|
gentoo importer V2 logs: gentoo importer V1 logs: |
76f65a8 to
0bed9dd
Compare
4c5830d to
ca3fc16
Compare
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Update the Gentoo get_safe_and_affected_versions function in advisory v2 Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
76c1f80 to
a5e7bd4
Compare
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
keshav-space
left a comment
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.
@ziadhany Thanks, see some feedback below.
|
|
||
| affected_package = AffectedPackageV2( | ||
| package=purl, | ||
| affected_version_range=EbuildVersionRange(constraints=[constraint]), |
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.
It does not make sense to report unaffected range in affected_version_range.
| if invert: | ||
| constraint = constraint.invert() |
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.
@ziadhany why do we invert fixed range, we should report fixed range as is.
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.
@keshav-space we have two type of package version
- unaffected
- vulnerable
GLSA-201405-01 , CVE-2014-0004
<affected>
<package name="sys-fs/udisks" auto="yes" arch="*">
<unaffected range="rge">1.0.5</unaffected>
<unaffected range="ge">2.1.3</unaffected>
<vulnerable range="lt">2.1.3</vulnerable>
</package>
</affected>
we invert the unaffected (safe_version) to get the affected version if it isn’t specified.
see line: 159, 162
the main question is that does the unaffected mean fixed range, if yes I should update this
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.
the main question is that does the unaffected mean fixed range, if yes I should update this
@ziadhany Yes, unaffected is fixed range see resolution section here https://security.gentoo.org/glsa/201405-01 so if we get unaffected range it should be treated as fixed range.
Also rge means revision greater than equals and rgt means revision greater than lets mention this in comments.
<unaffected range="ge">2.1.3</unaffected> is pretty straight forward it translates to fixed range vers:ebuild/>=2.1.3. But revision range are bit tricky here <unaffected range="rge">1.0.5</unaffected> translates to vers:ebuild/>=1.0.5|<1.1 see the interpretation here https://security.gentoo.org/glsa/201405-01
similarly for this advisory https://security.gentoo.org/glsa/202004-13 we have these unaffected range
<unaffected range="rge">2.23.3</unaffected>
<unaffected range="rge">2.24.3</unaffected>
<unaffected range="rge">2.25.4</unaffected>
<unaffected range="rge">2.26.2</unaffected>and these would be interpreted as fixed range
vers:ebuild/>=2.23.3|<2.24
vers:ebuild/>=2.24.3|<2.25
vers:ebuild/>=2.25.4|<2.26
vers:ebuild/>=2.26.2|<2.27
| { | ||
| "package": { | ||
| "type": "ebuild", | ||
| "namespace": "dev-vcs", | ||
| "name": "subversion", | ||
| "version": "", | ||
| "qualifiers": "", | ||
| "subpath": "" | ||
| }, | ||
| "affected_version_range": "vers:ebuild/<=1.8.18", | ||
| "fixed_version_range": null, | ||
| "introduced_by_commit_patches": [], | ||
| "fixed_by_commit_patches": [] | ||
| } |
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.
Not right, for the unaffected range <unaffected range="ge">1.9.7</unaffected> and <unaffected range="rgt">1.8.18</unaffected> we should report vers:ebuild/>1.8.18 and vers:ebuild/1.9.7 as fixed version range and do not invert these and report it as affected vers.
Signed-off-by: ziad hany <ziadhany2016@gmail.com>
… and fixed_version_range for non-revision versions Signed-off-by: ziad hany <ziadhany2016@gmail.com>
Issue: