feat: Add Support for PURL Scanning and Markdown Report - #50
Conversation
abhisek
commented
Oct 25, 2025
- refactor: Support multiple source repo
- refactor: Organize reporting flags with prefix
- test: Add package pull test case
- fix: Add support for code snippet in HTML reporter
- feat: Add support for markdown reporter
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #50 +/- ##
==========================================
+ Coverage 3.40% 20.01% +16.60%
==========================================
Files 19 22 +3
Lines 880 1239 +359
==========================================
+ Hits 30 248 +218
- Misses 843 972 +129
- Partials 7 19 +12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
vet Summary ReportThis report is generated by vet Policy Checks
Malicious Package AnalysisMalicious package analysis was performed using SafeDep Cloud API Malicious Package Analysis Report
Changed PackagesChanged Packages
Policy ViolationsPackages Violating Policy[Go]
|
SafeDep Report SummaryPackage Details
This report is generated by SafeDep Github App |
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for scanning packages by PURL and introduces a markdown reporter format, alongside improvements to HTML reporting and test coverage.
Key Changes:
- Added PURL-based package scanning that pulls, caches, and scans remote packages
- Implemented a markdown report generator with configurable sections and code snippet support
- Enhanced HTML reporter with improved code snippet handling including truncation and source availability indicators
- Reorganized CLI flags with
--report-prefix for better organization
Reviewed Changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
cmd/generate.go |
Added PURL input support, reorganized report flags with --report- prefix, and refactored generation flow |
internal/command/package_pull.go |
New package pulling functionality to fetch and cache packages by PURL |
internal/command/package_pull_test.go |
Comprehensive test coverage for package pull operations |
pkg/reporter/markdown.go |
New markdown reporter implementation with configurable sections |
pkg/reporter/markdown_test.go |
Test suite for markdown reporter functionality |
pkg/reporter/snippet.go |
Shared snippet extraction logic with size limits and truncation support |
pkg/reporter/snippet_test.go |
Test coverage for snippet extraction functionality |
pkg/reporter/html.go |
Enhanced with snippet configuration and improved error handling |
pkg/reporter/html_test.go |
Added tests for enhanced snippet fields |
pkg/reporter/templates/report.html |
Updated template with snippet truncation and unavailability indicators |
pkg/reporter/templates/report.md |
New markdown report template |
pkg/reporter/summary.go |
Updated help message to be format-agnostic |
internal/analytics/analytics_test.go |
Improved error handling in tests |
go.mod |
Updated dependencies |
flake.nix |
New Nix development environment configuration |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Abhisek Datta <abhisek.datta@gmail.com>
