Add dart support (#919)

Co-authored-by: Alex Goodman <alex.goodman@anchore.com>
This commit is contained in:
Eric Larssen
2022-03-31 15:44:55 -04:00
committed by GitHub
co-authored by Alex Goodman
parent f157d7a862
commit cb3e73e308
25 changed files with 1690 additions and 10 deletions
@@ -130,6 +130,12 @@ func (p *Package) UnmarshalJSON(b []byte) error {
return err
}
p.Metadata = payload
case pkg.DartPubMetadataType:
var payload pkg.DartPubMetadata
if err := json.Unmarshal(unpacker.Metadata, &payload); err != nil {
return err
}
p.Metadata = payload
default:
log.Warnf("unknown package metadata type=%q for packageID=%q", p.MetadataType, p.ID)
}
@@ -88,7 +88,7 @@
}
},
"schema": {
"version": "3.2.1",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.1.json"
"version": "3.2.2",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.2.json"
}
}
@@ -184,7 +184,7 @@
}
},
"schema": {
"version": "3.2.1",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.1.json"
"version": "3.2.2",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.2.json"
}
}
@@ -111,7 +111,7 @@
}
},
"schema": {
"version": "3.2.1",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.1.json"
"version": "3.2.2",
"url": "https://raw.githubusercontent.com/anchore/syft/main/schema/json/schema-3.2.2.json"
}
}