import predicate type from @actions/attest (#10)

Signed-off-by: Brian DeHamer <bdehamer@github.com>
This commit is contained in:
Brian DeHamer
2024-02-27 08:18:56 -08:00
committed by GitHub
parent 775f7eda24
commit a024fd602e
3 changed files with 1086 additions and 5 deletions

View File

@@ -1,16 +1,13 @@
import fs from 'fs'
import * as path from 'path'
import type { Predicate } from '@actions/attest'
export type SBOM = {
type: 'spdx' | 'cyclonedx'
object: object
}
type Predicate = {
type: string
params: object
}
export async function parseSBOMFromPath(filePath: string): Promise<SBOM> {
// Read the file content
const fileContent = await fs.promises.readFile(filePath, 'utf8')