GoogleContainerTools / GoogleContainerTools/container-structure-test
mime type check
- Dominant language
- Go
- Stars
- 2.5k
- Forks
- 212
- PR merge metrics
- No merged PRs in 30d
Description
It'd be nice to be able to validate certain file types, e.g. shared objects, dynamically linked executables, static executables, and executables for different architectures.
It's currently possible to do with `file`, but it's a big dependency to pull in and it's normally not present in minimal images.
Example:
```YAML
fileContentTests:
- name: "bash is an executable binary"
path: "/bin/bash"
mimeType: 'application/x-executable'
isExecutable: true
elfBinaryTests:
- name: "bash is dynamically linked arm64 binary"
path: "/bin/bash"
isDynamicallyLinked: true
architecture: "amd64"
```
Contributor guide
Assessment
This issue has not been assessed yet.