86 Commits

Author SHA1 Message Date
Abhisek Datta
6acf08aec0
feat: Exclude Fork and Archive during GitHub Org Scan (#650)
* Only scan private repos under org based scan

* Only scan private repos under org based scan

* fix: Style and formatting issues

* Update scan.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Abhisek Datta <abhisek.datta@gmail.com>

* fix: Add tests for github org reader filters

---------

Signed-off-by: Abhisek Datta <abhisek.datta@gmail.com>
Co-authored-by: infosecwonderland <monika.talekar@ascenda.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-09 16:44:49 +00:00
Oleksandr Redko
4e39cebe61
chore: add formatters to golangci-lint config (#643)
Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
2025-11-27 14:58:24 +05:30
Abhisek Datta
3eb501c72b
feat: Add Support for Filter v2 - Spec Based Policy Engine (#560)
* feat: Add support for filter v2

* Add filter v2 support

* Add test for filter v2 evaluator

* fix: CEL v2 query engine

* chore: Add sample policy-v2

* chore: Remove deprecated API use

* fix: Remove deprecated API

* fix: Misc linter fixes

* fix: Linter fixes

* fix: Policy v2 sample

* refactor: Extract filter match rendering into common concern

* test: Update test case

* fix: JSON round trip problem by using PB messages for filter eval

* Improve DX by declaring enum constants in CEL env

* fix: Code generator for enum type names

* docs: Add policy dev enumgen docs

* chore: Add example policy

* test: Add test for CEL filter suite v2 analyser

* Code review fixes

* fix: Code review comments

* chore: Add CI check to ensure generated code is updated

* fix: Add nil guards during init
2025-10-02 09:01:50 +05:30
Sahil Bansal
5844d4ffd1
add support for generating sbom for homebrew installed packages (#571)
* add support for generating sbom for homebrew installed packages

* add brew test cases

* Update scan.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com>

* minor error improvements

* add brew ecosystem

* maintain consistency in ecosystem name

* rename `brew` flag to `homebrew`

---------

Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-25 12:00:02 +05:30
Sahil Bansal
0f4c01b83a
add html reporter & create template for report (#559)
* add html reporter & create template for report

* updated table colors

* chore: rm unused code block

* add policy violations

* chore: rm extra var

* Update pkg/reporter/templates/report.templ

Co-authored-by: Kunal Singh <kunalsin9h@gmail.com>
Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com>

* chore: rm extra file

* chore: rm unsued css property

* add html reporter & create template for report

* updated table colors

* chore: rm unused code block

* add policy violations

* chore: rm extra var

* Update pkg/reporter/templates/report.templ

Co-authored-by: Kunal Singh <kunalsin9h@gmail.com>
Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com>

* chore: rm extra file

* chore: rm unsued css property

* return error when failing to create html reporter

---------

Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com>
Co-authored-by: Kunal Singh <kunalsin9h@gmail.com>
2025-08-18 09:33:18 +05:30
Sahil Bansal
150cad94a6
Support exclusion patterns for lockfiles flag (#543)
* introduce config for lockfile reader

* add exclusion support

* add test cases for exclusion patterns

* refactor: introduce common exclusion matcher and update lockfile reader to use it

* chore: rm print statements

* refactor: use better naming for tests

* use doublestar lib for supporting dir reader exclusion patterns

* fix: path handling in exclusion matcher to support relative & absolute paths
2025-07-22 08:37:41 +05:30
Sahil Bansal
3d6d8ed036
Add github actions sync resolver (#539)
* feat: add GHA env resolver

* refactor: expose sync reporter resolver constructors

* fix: use os.LookupEnv for better GHA detection

* fix typo

* use environment sync resolver

* test: add test cases & fix naming

* Update pkg/reporter/sync_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com>

* modify sync resolver tests

* fix tests failing in ci/cd

---------

Signed-off-by: Sahil Bansal <bansalsahil315@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-21 09:11:24 +05:30
Sahil Bansal
06988f9b33
OpenVSX extensions scanning support (#536)
* feat(readers): Add OpenVSX ecosystem support

* refactor: use better naming conventions

* refactor: improve extensions reader with structured config
2025-07-15 18:40:02 +05:30
Abhisek Datta
5f4cccbc85
feat: Add Support for Agentic Query and Analysis (#535)
* Add initial UI for agent mode

* fix: Cleanup and define agent contract

* Add react agent

* Add interactions memory

* Add support for stdio based MCP integration

* Add basic sqlite3 report generator

* fix: Persist vulnerabilities with package relation

* fix: Persist license information

* refactor: Agents into its own command package

* feat: Add support for tool calling introspection

* refactor: UI to hide implementation detail

* sqlite3 reporter persist dependency graph

* fix: Support multiple LLM provider for agent

* docs: Update agents doc

* docs: Remove deprecated query docs

* fix: UI tests

* fix: Linter issue

* Add support for prompt mode

* Improve UI with animation

* Fix UI tests after update

* Add OpenSSF scorecard persistence

* Add slsa provenances in sqlite3 reporter

* Add test cases for sqlite3 reporter

* Fix agent doc

* fix: Sqlite3 reporter use safe accessors

* feat: Add support for fast model

* feat: Simplify and streamline agent UI for better user experience

- Remove decorative borders and excessive styling to maximize output area
- Implement clean minimal design similar to modern TUI interfaces
- Add bordered input area for clear visual separation
- Move thinking indicator above input area for better visibility
- Enhance input field reset logic for proper line alignment
- Remove verbose help text and status messages
- Optimize layout calculations for full width utilization
- Add smooth animations for agent thinking state with spinner
- Clean up code structure and remove unused progress bar functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Improve agent status line

* test: Update UI tests

* fix: Use terminal safe rendering

* fix: Fix nil deref without storing empty strings in DB

* fix: Support overwriting sqlite3 database

* fix: Data model to use m2m between manifest and package

* style: Fix linter issue with unused variables

* Misc fixes

* Add test for agent memory

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-07-11 18:37:44 +05:30
Kunal Singh
49cc6ca395
Support for local docker and tar images in container scanning. (#497)
* refactor: convert current image resolution into workflow pattern

* feat: image from local tarball folder

* feat: image from local docker catalog

* refacot: decompose docker image catalog resolver into multiple functions

* refactor: using utilit function for logging and return error

* feat: remove tem tar dir after image obj is created

* refactor: handle empty nil error in log and error funciton

* removed local image not supported test

* fix: error fmt.Errorf with non-constant values

* go mod tidy

* fix: linter unreachable  code

* refactor: removed unwanted parameter

* test: added scenerio for different image scan operations

* fix: added scenario into all.sh

* fix: missed .sh extension for one entry

* fix: test bad file path for local tar scan

* remvoed logger and error combined function

* refactor: using context form top of tree

* feat: using custom error for image resolution unsupported

* refactor: returning unsupported workflow error for each docker api fail

* feat: added no-remote flag for disable remote fetch

* feat: --image-no-remote

* fix: test, creating temp files witn \/ causing issue

* chore: Misc cleanup for Container Image Resolver (#499)

* chore: Misc cleanup

* fix: Bug with docker image resolver

* fix: Error msg

* chore: Improve debug logging for docker enumeration

* chore: Improve debug logging for docker enumeration

---------

Co-authored-by: Abhisek Datta <abhisek.datta@gmail.com>
2025-05-29 22:36:49 +05:30
Abhisek Datta
72e08bdd8a
refactor: Sync reporter to allow env resolver adapter (#495)
* refactor: Sync reporter to allow env resolver adapter

* fix: Set optional params only when not empty

* fix: linter warning
2025-05-27 22:00:50 +05:30
Kunal Singh
1f8a5750d2
feat: container scanning (#489)
* feat: container scanning

* fix: tests

* refactor: added commens and set running-system for remote image to false

* using standalone extractors with all scope

* feat: handle manifects

* using set for duplicate purl

* feat: added initial tests

* refactor: creating manifest from local and modified tests

* refactor: decouple parser and reader for container scanning

* refactor: seperated image and reader config

* refactor: using applicatoin name to purl

* refactor: removed technical osv-scalibr names from error message

* refactor: misc

* added analytics

* moved container image reader test to e2e test

* refactor: getting image in consutrctor

* refactor: composit grouping of ecosystem and file

* feat: cache to reudce duplicate packages

* refactor: removed json-dump-dir output dir

* feat: added ui for better UX

* test: skip when not e2e

* refactor: made scalibr image object reference private

* test: application name testing'

* test, different image with invalid cases

* feat: clean up image after use

* refactor: fetching image in enum manifests

* fix: tests, handing error from enum manifests

* tests: added test for local image not supported

* refactor: removed ui reference in container reader
2025-05-27 20:45:37 +05:30
infosecwonderland
eebae09e82
feat: add excludeRepos support to GithubOrgReader (#476)
* feat: add excludeRepos support to GithubOrgReader

* feat: add excludeRepos support to GithubOrgReader

* Syntax changes

* fix: excluded repo variable declartion

* fix: scan command to include excluded repo config

---------

Co-authored-by: abhisek <abhisek.datta@gmail.com>
2025-04-28 15:03:54 +05:30
Abhisek Datta
3490812ed1
chore: Add anonymous telemetry collector (#468)
* chore: Add anonymous telemetry collector

* fix: Posthog property handling
2025-04-22 15:53:32 +05:30
abhisek
00eb5c8ec7
feat: Update markdown summary reporter for malware query 2025-04-20 10:45:59 +05:30
abhisek
3d7ea62f61
feat: Add malware query enricher 2025-04-19 22:11:17 +05:30
Kunal Singh
3d9639d0ef
feat: github repos version resolution (#458)
* feat: github repos version resolution

* fix: malware analysis e2e testing

* fix: e2e testing for malware analysis using vet scan

* revert: e2e testing

* fix(test): remove bad e2e tests commands, scan without version has not effect

* fix: test failing 🔥, for scoped packages

* feat(e2e): added inspect malware command

* fix: use of internal code to library

* refactor: Maintain separation of concerns and loose coupling

* fix: PURL reader test

---------

Co-authored-by: abhisek <abhisek.datta@gmail.com>
2025-04-12 08:05:01 +05:30
Omkar Phansopkar
923fc4744c
Implemented CycloneDX reporter with metadata, packages & vulnerabilities (#434)
* Implemented CycloneDX reporter with metadata, packages & vulnerabilities

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Refactor to using PtrTo instead of dereferencing

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Minor lint fixes

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Implemented CycloneDX features - Licenses, Vulnerability & annotations

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Support malware in cyclonedx bom

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Script for SPDX licenses, prevent duplicate vulnerabilities

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Fix comment typo

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Test cases for reader application names

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Replaced StringPtr with PtrTo

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Tests for cyclonedx reporter and cvss score calculation

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

---------

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-08 19:54:50 +05:30
Omkar Phansopkar
d7f7a6c72e
Use common ToolMetadata for all reporters and default-enable vuln & malware in SARIF
Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
2025-04-01 21:10:45 +05:30
Omkar Phansopkar
86382bbc70
Refactor tool meta data config & using separate vulncache
Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
2025-04-01 19:52:08 +05:30
Omkar Phansopkar
d0111cec20 Added vulnerabilities & malware in SARIF reports
Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
2025-03-31 20:59:29 +05:30
Kunal Singh
c156f54274
Feat/gitlab report (#419)
* feat: new gitlab report

* fix: gitlab-report version missing

Signed-off-by: Kunal Singh <kunalsin9h@gmail.com>

* fix: isseues with schema

* added comments

* fix: removed unknown identifiers

* fix: direct dependency suing depth == 0

* oops: pushed output file :)

* fix: identifiers was taken only one eacy type

* fix: nested struct on GitLabReport

* added relavent docs reference

* fix: hardcoded vet version, with correct version from version.go

* added malwares

* refactor: minor

* fix: summary and name

* added tests

* refactor: seperate function for severity

* refactor: using enums for severity

Signed-off-by: Kunal Singh <kunalsin9h@gmail.com>

* feat: using all gitlab identifiers

* refactor: removed unwanted package struct exports

* refactor: IsDirect function to check if package is direct dependency

* removed TODO comments

* refactor: using non-standard id for malware analysis

* refactor: removed hardcoded valuesin gitlab.go

* refactor: gitlab consts

* feat: add gitlab scan fail status const

* refactor: extracted identifiers urls

* fix: github adivisory link

* refactor: solid principle for identifiers url, and scoped method for gitlab reporter

---------

Signed-off-by: Kunal Singh <kunalsin9h@gmail.com>
2025-03-26 20:26:05 +05:30
Abhisek Datta
f6258fdc86
feat: Add support for malysis min confidence config (#429)
* feat: Add support for malysis min confidence config

* fix: Test case to use factory function
2025-03-26 14:07:40 +05:30
Abhisek Datta
49b2e0f3df
feat: Add Support for GitHub Action or Repository Scanning (#405)
* feat: Add support for github actions scanning

* fix: enrich malware test cases

* fix: fail fast for malware inspect if auth not available

* fix: bug with package version
2025-03-21 04:23:47 +05:30
Kunal Singh
e0bb4a7836
feat: progress bar in cloud report syncing (#400)
* feat: progress bar in cloud report syncing

Signed-off-by: Kunal Singh <kunalsin9h@gmail.com>

* fix: missing nil check guard in syncReportTracker closure

* Update pkg/reporter/sync.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Kunal Singh <kunalsin9h@gmail.com>

* fix: race condition of pre-closure of progress bar before finish

* fix: race condition

* fix: Delay marking trackers as done till stop event

---------

Signed-off-by: Kunal Singh <kunalsin9h@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: abhisek <abhisek.datta@gmail.com>
2025-03-19 09:36:27 +05:30
Omkar Phansopkar
666011a975
Implemented Defectdojo reporter (#388)
* Implemented Defectdojo reporter

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Added defect-dojo reporter to query command

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Accept defectdojo host URL as arg instead of environment variable

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

---------

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
Co-authored-by: Abhisek Datta <abhisek.datta@gmail.com>
2025-03-17 11:55:22 +05:30
Abhisek Datta
1864e687f8
feat/vscode malysis support (#368)
* chore: Update API sdk to add support for vsx scanning

* chore: Add inspect cmd flag to skip waiting for result

* feat: Add support for VS Code extension reader

* fix: Remove unnecessary vsx distribution path
2025-03-04 13:43:09 +05:30
Abhisek Datta
d599ac8407
feat: Add vet cloud quickstart command (#361)
* feat: Add vet cloud quickstart command

* fix: Quick start tenant setup

* fix: Display msg for API key creation
2025-02-27 04:24:49 +05:30
Abhisek Datta
c313485e2f
feat: Allow summary report to filter by usage evidence (#354)
* feat: Allow summary report to filter by usage evidence

* fix: Filter by dependency usage evidence
2025-02-19 23:17:35 +05:30
Omkar Phansopkar
89a6233e76
Integrated depsusage data prepared by code analysis and report unused deps in summary (#336)
* Integrated depsusage data and report with summary

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Verified enricher contracts

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Updated scan command flags & summary reporter

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

---------

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
2025-02-04 13:23:47 +05:30
Abhisek Datta
bc7773d90a
fix: Ensure version is available for sync reporter (#335)
* fix: Ensure version is available for sync reporter

* fix: Fail fast using cobra prerun hook
2025-02-04 09:18:55 +05:30
Omkar Phansopkar
08b5f612ac
Implemented code scan command for building sqlite storage with code analysis data (#326)
* Implemented code scan command for building sqlite storage with code analysis data

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* Added E2E test for code scan command

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>

* refactor: Migrate pkg/command to internal/command since we use pkg as a independent concern

---------

Signed-off-by: Omkar Phansopkar <omkarphansopkar@gmail.com>
Co-authored-by: abhisek <abhisek.datta@gmail.com>
2025-02-03 11:23:51 +05:30
Abhisek Datta
2c92368985
feat: Add Malysis Integration at Scan Phase (#309)
* feat: Integrate malysis based malware analysis data enricher

* feat: Extend package model to store malware analysis data

* fix: Wait for package enrichers with timeout

* feat: Add malware analyzer plugin

* feat: Add support for malware analyser for classification

* feat: Add support for backoff retry

* fix: Bug with backoff/retry loop

* feat: Update markdown summary reporter for malware analysis stats

* docs: Add docs for malysis enricher config

* docs: Update README.md for malware analysis reference

* feat: Add cli flag to configure trust on tool result

* feat: Add cli flag to customize malware analysis wait time

* test: Add E2E test for malware analysis integration

* fix: Path of malware analysis e2e test

* fix: Show malysis metrics in markdown summary report

* fix: Malware analyser raise filter event for rest of the engine to know about malware
2025-01-22 09:50:59 +05:30
abhisek
8f29d4aba0
fix: Show msg to differentiate between authenticated or non-auth scans 2024-11-13 16:20:34 +05:30
abhisek
652b465893
chore: Add error msg when Insights v2 is used without API key 2024-11-13 08:01:31 +05:30
abhisek
378b1ed89e
feat: Add insights v2 enricher 2024-11-12 08:12:27 +05:30
abhisek
ebf6516817
feat: Add insights v2 API url config and client 2024-11-12 07:59:27 +05:30
abhisek
d2290cdfe7
feat: Add support to skip using GitHub dependency graph API 2024-10-19 10:38:42 +05:30
abhisek
06b080a81c
feat: Add API key management command 2024-10-10 08:23:00 +05:30
abhisek
d016c63174
refactor: grpc client to separate cloud and sync API 2024-10-07 23:04:18 +05:30
abhisek
476cd4d29d
refactor: gRPC connection setup into auth package 2024-10-02 21:57:57 +05:30
abhisek
fca2b8e3ab
feat: Cloud report sync support multi-project sync 2024-09-30 13:59:12 +05:30
abhisek
7a5d637a50
refactor: Enable tool service session pooling in cloud sync reporter 2024-09-30 12:48:44 +05:30
abhisek
d7a1508b8e
refactor: Remove OpenAPI specs for deprecated control API and use gRPC report sync client 2024-09-27 08:15:21 +05:30
abhisek
a69cd670b4
feat: Add support for jar scanning
refactor: Parser target resolver to re-use from lockfile and directory reader

feat: Add support for scope based parse target resolution

refactor: Dir reader to use config struct

test: Fix directory reader tests

refactor: Rename parser utils to resolver

doc: Add jar scanning example in README.md
2024-09-07 15:45:32 +05:30
abhisek
47c605ee06
feat: Add support for SARIF reporting #22 2024-06-21 09:40:41 +05:30
abhisek
ebe5411ba1
chore: Fallback to community mode when auth is unavailable
docs: Add contributing and maintainers doc

docs: Update README

docs: Add TOC in README

docs: Fix README TOC

Signed-off-by: abhisek <abhisek.datta@gmail.com>
2024-04-02 16:34:48 +05:30
abhisek
38940ea364
feat: Add support for markdown summary report generator 2024-03-26 16:26:38 +05:30
abhisek
7f2f729418
feat: Add command line arg for group by direct dependencies 2024-02-04 23:11:17 +05:30
abhisek
1dba6fdd8e
refactor: Parser to use dependency graph parsers
feat: Add npm package-lock.json graph parser

fix: Npm graph parser path to root traversal

fix: File naming convention for npm graph parser

feat: Add reporter for graph visualization in dot format

feat: Add support for showing dependency upgrade path in summary report

fix: Bug in summary reporter related to random ordering of entries with same score

chore: Add support for experimental flag in scanner config

refactor: Test cases or npm package name extractor into utils

feat: Add support for dependency graph data in CSV report generator

fix: LFP npm handle package links

test: Improve test for npm name extraction

feat: Add support for reconstructing dependency graph using insights data

fix: purl reader to use package manifest builder

test: Add E2E for gradle dependency graph reconstruction

fix: Handle root node marking heuristics for enriched dependency graph

feat: Allow query command to generate dependency graph

fix: Scanner dependency graph reconstruction using dependency distance

fix: Test case for maven dependency graph reconstruction

chore: Improve summary report text for dependency path to root

refactor: Code re-use in npm graph to find by semver range
2024-01-15 00:20:56 +05:30