GoogleContainerTools / GoogleContainerTools/container-structure-test

mime type check

Open
#257 1 comment 2 reactions 0 assignees View on GitHub
enhancement help wanted
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.