js

package
v0.0.19-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2025 License: AGPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(sourceCodeDir string, analysisId uuid.UUID) sbom.Output

Start is a function that analyzes the source code directory and generates a software bill of materials (SBOM) output. It returns an sbom.Output struct containing the analysis results.

Types

type JSSBOMAnalyzer

type JSSBOMAnalyzer struct{}

JSSBOMAnalyzer implements the SBOMAnalyzer interface for JavaScript projects

func (*JSSBOMAnalyzer) AnalyzeProject

func (j *JSSBOMAnalyzer) AnalyzeProject(projectPath string, analysisId string, knowledgeDB any) (boilerplates.SBOMOutput, error)

AnalyzeProject performs JavaScript SBOM analysis

func (*JSSBOMAnalyzer) CanAnalyze

func (j *JSSBOMAnalyzer) CanAnalyze(projectPath string) bool

CanAnalyze checks if this analyzer can handle the given project

func (*JSSBOMAnalyzer) ConvertToMap

func (j *JSSBOMAnalyzer) ConvertToMap(output boilerplates.SBOMOutput) map[string]any

ConvertToMap converts the JavaScript SBOM output to map[string]any for storage

func (*JSSBOMAnalyzer) DetectFramework

func (j *JSSBOMAnalyzer) DetectFramework(projectPath string) string

DetectFramework detects the JavaScript framework used in the project

func (*JSSBOMAnalyzer) GetDependencyCount

func (j *JSSBOMAnalyzer) GetDependencyCount(output boilerplates.SBOMOutput) int

GetDependencyCount returns the total number of dependencies found

func (*JSSBOMAnalyzer) GetLanguage

func (j *JSSBOMAnalyzer) GetLanguage() string

GetLanguage returns the language this analyzer handles

type JSSBOMOutput

type JSSBOMOutput struct {
	Output sbom.Output
}

JSSBOMOutput wraps the existing JavaScript sbom.Output to implement SBOMOutput interface

func (*JSSBOMOutput) GetFramework

func (j *JSSBOMOutput) GetFramework() string

GetFramework returns the detected framework

func (*JSSBOMOutput) GetStatus

func (j *JSSBOMOutput) GetStatus() codeclarity.AnalysisStatus

GetStatus returns the analysis status

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL