-
Notifications
You must be signed in to change notification settings - Fork 605
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
Detect ELF security features #2443
Conversation
502c1bc
to
0efeebc
Compare
Signed-off-by: Alex Goodman <[email protected]>
4d6448f
to
8bce64f
Compare
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
d797c4b
to
c5b7ea0
Compare
JSON schema diff for reviewers: # diff schema/json/schema-16.0.0.json schema/json/schema-16.0.1.json
3c3
< "$id": "anchore.io/schema/syft/json/16.0.0/document",
---
> "$id": "anchore.io/schema/syft/json/16.0.1/document",
562a563,601
> ]
> },
> "ELFSecurityFeatures": {
> "properties": {
> "symbolTableStripped": {
> "type": "boolean"
> },
> "stackCanary": {
> "type": "boolean"
> },
> "nx": {
> "type": "boolean"
> },
> "relRO": {
> "type": "string"
> },
> "pie": {
> "type": "boolean"
> },
> "dso": {
> "type": "boolean"
> },
> "safeStack": {
> "type": "boolean"
> },
> "cfi": {
> "type": "boolean"
> },
> "fortify": {
> "type": "boolean"
> }
> },
> "type": "object",
> "required": [
> "symbolTableStripped",
> "nx",
> "relRO",
> "pie",
> "dso"
608a648,661
> ]
> },
> "Executable": {
> "properties": {
> "format": {
> "type": "string"
> },
> "elfSecurityFeatures": {
> "$ref": "#/$defs/ELFSecurityFeatures"
> }
> },
> "type": "object",
> "required": [
> "format"
635a689,691
> },
> "executable": {
> "$ref": "#/$defs/Executable"
|
Signed-off-by: Alex Goodman <[email protected]>
cfe92f9
to
d481934
Compare
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
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.
Looks good! I agree with the security features additions and don't have comments about this going in as the first pass for ELF type with extra executable formats to follow.
I had two questions about the schema version and some presentation concerns that are in a few main library catalogers and how we want to look at those going into v1.0
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
Signed-off-by: Alex Goodman <[email protected]>
* add detection of ELF security features Signed-off-by: Alex Goodman <[email protected]> * fix linting Signed-off-by: Alex Goodman <[email protected]> * update json schema with file executable data Signed-off-by: Alex Goodman <[email protected]> * update expected fixure when no tty present Signed-off-by: Alex Goodman <[email protected]> * more detailed differ Signed-off-by: Alex Goodman <[email protected]> * use json differ Signed-off-by: Alex Goodman <[email protected]> * fix tests Signed-off-by: Alex Goodman <[email protected]> * remove json schema addition Signed-off-by: Alex Goodman <[email protected]> * regenerate json schema Signed-off-by: Alex Goodman <[email protected]> * fix mimtype set ref Signed-off-by: Alex Goodman <[email protected]> --------- Signed-off-by: Alex Goodman <[email protected]>
This is a PoC for detecting specific ELF security features from discovered binaries (mostly ported from the bash script logic found in checksec). Specifically:
selfrando(deferred)This extends the file attributes for that binary in the SBOM with a new
Executable
section.Deferred
Closes #2434