Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var KnownDependencyFiles = []string{
"package.json",
"package-lock.json",
"yarn.lock",
"Gemfile",
"Gemfile.lock",
"requirements.txt",
"Pipfile",
"Pipfile.lock",
"go.mod",
"go.sum",
}
KnownDependencyFiles lists the files we are interested in for dependency checking
Functions ¶
func IsKnownDependencyFile ¶
isKnownDependencyFile checks if a file is one of the known dependency files
Types ¶
type AdvisoryDetails ¶
type AdvisoryDetails struct {
AdvisoryKey struct {
ID string `json:"id"`
} `json:"advisoryKey"`
URL string `json:"url"`
Title string `json:"title"`
Aliases []string `json:"aliases"`
CVSS3Score float64 `json:"cvss3Score"`
CVSS3Vector string `json:"cvss3Vector"`
}
AdvisoryDetails represents detailed information about a security advisory
type Dependency ¶
Dependency represents a single dependency in package.json
type FileTracker ¶
type FileTracker struct {
// contains filtered or unexported fields
}
func NewFileTracker ¶
func NewFileTracker() *FileTracker
NewFileTracker creates and returns a new FileTracker instance
func (*FileTracker) ClearSeenMap ¶
func (ft *FileTracker) ClearSeenMap()
ClearSeenMap clears the seen map
func (*FileTracker) IsFileSeen ¶
func (ft *FileTracker) IsFileSeen(fileName string) bool
IsFileSeen checks if the specified file has been marked as seen
func (*FileTracker) MarkFileAsSeen ¶
func (ft *FileTracker) MarkFileAsSeen(fileName string)
MarkFileAsSeen marks the specified file as processed
type Response ¶
type Response struct {
VersionKey struct {
System string `json:"system"`
Name string `json:"name"`
Version string `json:"version"`
} `json:"versionKey"`
PublishedAt string `json:"publishedAt"`
IsDefault bool `json:"isDefault"`
Licenses []string `json:"licenses"`
AdvisoryKeys []Advisory `json:"advisoryKeys"`
Links []struct {
Label string `json:"label"`
URL string `json:"url"`
} `json:"links"`
SlsaProvenances []interface{} `json:"slsaProvenances"`
Registries []string `json:"registries"`
RelatedProjects []struct {
ProjectKey struct {
ID string `json:"id"`
} `json:"projectKey"`
RelationProvenance string `json:"relationProvenance"`
RelationType string `json:"relationType"`
} `json:"relatedProjects"`
}
type VulnIssue ¶
type VulnIssue struct {
Issue string `json:"issue"` // Description of the vulnerability
Path string `json:"asset"` // Path where the vulnerability was found
Title string `json:"title"` // Title of the vulnerability
CVSS3Score float64 `json:"cvss3"` // CVSS score
Ref string `json:"Reference"` // Reference link for the vulnerability
}
VulnIssue represents an identified vulnerability issue
Click to show internal directories.
Click to hide internal directories.