-
Notifications
You must be signed in to change notification settings - Fork 588
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Detect ELF security features #2443
Conversation
502c1bc
to
0efeebc
Compare
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
4d6448f
to
8bce64f
Compare
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
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 <wagoodman@users.noreply.github.com>
cfe92f9
to
d481934
Compare
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
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 <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
* add detection of ELF security features Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix linting Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * update json schema with file executable data Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * update expected fixure when no tty present Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * more detailed differ Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * use json differ Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix tests Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * remove json schema addition Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * regenerate json schema Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> * fix mimtype set ref Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com> --------- Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
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