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

1083
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -68,6 +68,7 @@
"@actions/core": "^1.10.1"
},
"devDependencies": {
"@actions/attest": "^1.0.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.11.20",
"@typescript-eslint/eslint-plugin": "^6.21.0",

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')