mirror of
https://github.com/anchore/syft.git
synced 2026-10-30 14:02:26 +01:00
feat(javascript): Add dependency parsing (#4304)
* feat: Add dependency parsing to javascript package locks Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com> * Bump schema version Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com> * Add support for yarn and pnpm, excl. yarn v1 Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com> * Add support for dependencies for v1 yarn lock files Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com> * Ensure schema is correctly generated Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com> * Fix tests Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com> * PR feedback Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com> --------- Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
||||
"$id": "anchore.io/schema/syft/json/16.0.41/document",
|
||||
"$id": "anchore.io/schema/syft/json/16.0.42/document",
|
||||
"$ref": "#/$defs/Document",
|
||||
"$defs": {
|
||||
"AlpmDbEntry": {
|
||||
@@ -1876,15 +1876,48 @@
|
||||
"integrity": {
|
||||
"type": "string",
|
||||
"description": "Integrity is Subresource Integrity hash for verification using standard SRI format (sha512-... or sha1-...). npm changed from SHA-1 to SHA-512 in newer versions. For registry sources this is the integrity from registry, for remote tarballs it's SHA-512 of the file. npm verifies tarball matches this hash before unpacking, throwing EINTEGRITY error if mismatch detected."
|
||||
},
|
||||
"dependencies": {
|
||||
"patternProperties": {
|
||||
".*": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"description": "Dependencies is a map of dependencies and their version markers, i.e. \"lodash\": \"^1.0.0\""
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"resolved",
|
||||
"integrity"
|
||||
"integrity",
|
||||
"dependencies"
|
||||
],
|
||||
"description": "NpmPackageLockEntry represents a single entry within the \"packages\" section of a package-lock.json file."
|
||||
},
|
||||
"JavascriptPnpmLockEntry": {
|
||||
"properties": {
|
||||
"resolution": {
|
||||
"$ref": "#/$defs/PnpmLockResolution",
|
||||
"description": "Resolution is the resolution information for the package"
|
||||
},
|
||||
"dependencies": {
|
||||
"patternProperties": {
|
||||
".*": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"description": "Dependencies is a map of dependencies and their versions"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"resolution",
|
||||
"dependencies"
|
||||
],
|
||||
"description": "PnpmLockEntry represents a single entry in the \"packages\" section of a pnpm-lock.yaml file."
|
||||
},
|
||||
"JavascriptYarnLockEntry": {
|
||||
"properties": {
|
||||
"resolved": {
|
||||
@@ -1894,12 +1927,22 @@
|
||||
"integrity": {
|
||||
"type": "string",
|
||||
"description": "Integrity is Subresource Integrity hash for verification (SRI format)"
|
||||
},
|
||||
"dependencies": {
|
||||
"patternProperties": {
|
||||
".*": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"description": "Dependencies is a map of dependencies and their versions"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"resolved",
|
||||
"integrity"
|
||||
"integrity",
|
||||
"dependencies"
|
||||
],
|
||||
"description": "YarnLockEntry represents a single entry section of a yarn.lock file."
|
||||
},
|
||||
@@ -2507,6 +2550,9 @@
|
||||
{
|
||||
"$ref": "#/$defs/JavascriptNpmPackageLockEntry"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/JavascriptPnpmLockEntry"
|
||||
},
|
||||
{
|
||||
"$ref": "#/$defs/JavascriptYarnLockEntry"
|
||||
},
|
||||
@@ -2958,6 +3004,18 @@
|
||||
],
|
||||
"description": "PhpPeclEntry represents a single package entry found within php pecl metadata files."
|
||||
},
|
||||
"PnpmLockResolution": {
|
||||
"properties": {
|
||||
"integrity": {
|
||||
"type": "string",
|
||||
"description": "Integrity is Subresource Integrity hash for verification (SRI format)"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"required": [
|
||||
"integrity"
|
||||
]
|
||||
},
|
||||
"PortageDbEntry": {
|
||||
"properties": {
|
||||
"installedSize": {
|
||||
|
||||
Reference in New Issue
Block a user