510 - SBOM attestation stdout (#785)

add syft attest command to produce an attestation as application/vnd.in-toto+json to standard out using on disk PKI

Signed-off-by: Christopher Phillips <christopher.phillips@anchore.com>
This commit is contained in:
Christopher Angelo Phillips
2022-02-22 21:45:12 -05:00
committed by GitHub
parent 738b3b60a5
commit 256e85bc12
20 changed files with 2698 additions and 145 deletions
+6
View File
@@ -18,3 +18,9 @@ func IsPipedInput() (bool, error) {
// if there *may* be bytes that will show up on stdin that should be used for the analysis source.
return fi.Mode()&os.ModeNamedPipe != 0, nil
}
// IsTerminal returns true if there is a terminal present.
func IsTerminal() bool {
stat, _ := os.Stdin.Stat()
return (stat.Mode() & os.ModeCharDevice) != 0
}