Skip to content
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

programkind: return MIME type & file extension, swap magic library #507

Merged
merged 29 commits into from
Oct 8, 2024

Conversation

tstromberg
Copy link
Collaborator

@tstromberg tstromberg commented Oct 8, 2024

For #454, I am adding MIME type and file extensions to programkind. This will allow us to use file extensions as short-hand in rule metadata, such as:

filetypes = "macho,elf,py,pl"

This PR does swap the magic implementation with one less flawed, but still not perfect.

I intend to also include the detected MIME Type in the JSON output, but that will be a future PR.

@tstromberg tstromberg marked this pull request as draft October 8, 2024 13:39
@tstromberg tstromberg changed the title programkind refactor for filetype support programkind refactor to return MIME type & file extension Oct 8, 2024
@tstromberg tstromberg requested a review from egibs October 8, 2024 20:03
@tstromberg tstromberg marked this pull request as ready for review October 8, 2024 20:04
@tstromberg tstromberg changed the title programkind refactor to return MIME type & file extension programkind: return MIME type & file extension, swap magic library Oct 8, 2024
@tstromberg tstromberg marked this pull request as draft October 8, 2024 20:10
@tstromberg tstromberg marked this pull request as ready for review October 8, 2024 21:02
@tstromberg tstromberg merged commit 7aa61e8 into chainguard-dev:main Oct 8, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants