verimu 0.0.21 → 0.0.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +1659 -1
- package/dist/cli.mjs.map +1 -1
- package/dist/index.cjs +1653 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +490 -1
- package/dist/index.d.ts +490 -1
- package/dist/index.mjs +1647 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -271,6 +271,12 @@ interface VerimuConfig {
|
|
|
271
271
|
numContextLines?: number;
|
|
272
272
|
/** Optional group name to associate this project with others in the dashboard */
|
|
273
273
|
groupName?: string;
|
|
274
|
+
/** Optional explicit project name to use for backend upsert/upload */
|
|
275
|
+
uploadProjectName?: string;
|
|
276
|
+
/** Optional repository URL to associate with this project in backend */
|
|
277
|
+
repositoryUrl?: string;
|
|
278
|
+
/** Optional source platform label (e.g., gitlab, github, bitbucket) */
|
|
279
|
+
platform?: CiProvider;
|
|
274
280
|
}
|
|
275
281
|
/** Input for the pure `generateSbom()` function */
|
|
276
282
|
interface GenerateSbomInput {
|
|
@@ -520,6 +526,489 @@ declare function shouldFailCi(report: VerimuReport, threshold: Severity): boolea
|
|
|
520
526
|
*/
|
|
521
527
|
declare function printReport(report: VerimuReport): void;
|
|
522
528
|
|
|
529
|
+
/**
|
|
530
|
+
* Types for the GitLab integration — remote scanning of self-hosted
|
|
531
|
+
* or cloud GitLab instances.
|
|
532
|
+
*/
|
|
533
|
+
|
|
534
|
+
/** GitLab project as returned by /api/v4/projects */
|
|
535
|
+
interface GitLabProject {
|
|
536
|
+
id: number;
|
|
537
|
+
name: string;
|
|
538
|
+
name_with_namespace: string;
|
|
539
|
+
path: string;
|
|
540
|
+
path_with_namespace: string;
|
|
541
|
+
description: string | null;
|
|
542
|
+
http_url_to_repo: string;
|
|
543
|
+
ssh_url_to_repo: string;
|
|
544
|
+
web_url: string;
|
|
545
|
+
default_branch: string;
|
|
546
|
+
archived: boolean;
|
|
547
|
+
empty_repo: boolean;
|
|
548
|
+
visibility: 'private' | 'internal' | 'public';
|
|
549
|
+
last_activity_at: string;
|
|
550
|
+
namespace: {
|
|
551
|
+
id: number;
|
|
552
|
+
name: string;
|
|
553
|
+
path: string;
|
|
554
|
+
kind: 'group' | 'user';
|
|
555
|
+
full_path: string;
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
/** GitLab group as returned by /api/v4/groups */
|
|
559
|
+
interface GitLabGroup {
|
|
560
|
+
id: number;
|
|
561
|
+
name: string;
|
|
562
|
+
path: string;
|
|
563
|
+
full_path: string;
|
|
564
|
+
description: string | null;
|
|
565
|
+
web_url: string;
|
|
566
|
+
parent_id: number | null;
|
|
567
|
+
}
|
|
568
|
+
/** Configuration for a GitLab-wide scan */
|
|
569
|
+
interface GitLabScanConfig {
|
|
570
|
+
/** GitLab instance base URL (e.g., https://git.solve.ch) */
|
|
571
|
+
url: string;
|
|
572
|
+
/** Personal access token or deploy token */
|
|
573
|
+
token: string;
|
|
574
|
+
/** Only scan repos in these groups (by path or ID). Empty = all accessible repos. */
|
|
575
|
+
groups?: string[];
|
|
576
|
+
/** Exclude repos matching these patterns (path_with_namespace glob) */
|
|
577
|
+
excludePatterns?: string[];
|
|
578
|
+
/** Skip archived repositories (default: true) */
|
|
579
|
+
excludeArchived?: boolean;
|
|
580
|
+
/** Skip empty repositories (default: true) */
|
|
581
|
+
excludeEmpty?: boolean;
|
|
582
|
+
/** Skip forked repositories (default: false) */
|
|
583
|
+
excludeForks?: boolean;
|
|
584
|
+
/** Maximum number of repos to scan (for testing) */
|
|
585
|
+
maxRepos?: number;
|
|
586
|
+
/** Branch to clone (default: each repo's default branch) */
|
|
587
|
+
branch?: string;
|
|
588
|
+
/** Where to write the HTML report */
|
|
589
|
+
htmlOutput?: string;
|
|
590
|
+
/** Where to write the JSON aggregate report */
|
|
591
|
+
jsonOutput?: string;
|
|
592
|
+
/** Skip CVE checking (just discover dependencies) */
|
|
593
|
+
skipCveCheck?: boolean;
|
|
594
|
+
/** Verimu API key for platform upload */
|
|
595
|
+
apiKey?: string;
|
|
596
|
+
/** Verimu API base URL */
|
|
597
|
+
apiBaseUrl?: string;
|
|
598
|
+
/** Group name for Verimu platform */
|
|
599
|
+
groupName?: string;
|
|
600
|
+
/** Maximum concurrent clone operations */
|
|
601
|
+
concurrency?: number;
|
|
602
|
+
}
|
|
603
|
+
/** Result of scanning a single GitLab repo */
|
|
604
|
+
interface GitLabRepoScanResult {
|
|
605
|
+
/** GitLab project metadata */
|
|
606
|
+
project: GitLabProject;
|
|
607
|
+
/** Verimu scan reports (one per discovered project in the repo) */
|
|
608
|
+
reports: VerimuReport[];
|
|
609
|
+
/** Whether any lockfile was found in the repo */
|
|
610
|
+
hasLockfile: boolean;
|
|
611
|
+
/** Error message if scan failed */
|
|
612
|
+
error?: string;
|
|
613
|
+
/** Time taken for this repo (clone + scan + cleanup) in ms */
|
|
614
|
+
durationMs: number;
|
|
615
|
+
}
|
|
616
|
+
/** Aggregate result of scanning all GitLab repos */
|
|
617
|
+
interface GitLabScanResult {
|
|
618
|
+
/** GitLab instance URL */
|
|
619
|
+
instanceUrl: string;
|
|
620
|
+
/** Total repositories discovered on the instance */
|
|
621
|
+
totalReposDiscovered: number;
|
|
622
|
+
/** Repos that were scanned (had lockfiles) */
|
|
623
|
+
scannedRepos: GitLabRepoScanResult[];
|
|
624
|
+
/** Repos skipped (no lockfile, archived, empty, excluded) */
|
|
625
|
+
skippedRepos: Array<{
|
|
626
|
+
project: GitLabProject;
|
|
627
|
+
reason: string;
|
|
628
|
+
}>;
|
|
629
|
+
/** Repos that failed to scan */
|
|
630
|
+
failedRepos: Array<{
|
|
631
|
+
project: GitLabProject;
|
|
632
|
+
error: string;
|
|
633
|
+
}>;
|
|
634
|
+
/** Aggregate vulnerability summary across all repos */
|
|
635
|
+
summary: {
|
|
636
|
+
totalRepos: number;
|
|
637
|
+
reposWithVulnerabilities: number;
|
|
638
|
+
totalDependencies: number;
|
|
639
|
+
totalVulnerabilities: number;
|
|
640
|
+
critical: number;
|
|
641
|
+
high: number;
|
|
642
|
+
medium: number;
|
|
643
|
+
low: number;
|
|
644
|
+
exploitedInWild: number;
|
|
645
|
+
ecosystemBreakdown: Record<string, number>;
|
|
646
|
+
};
|
|
647
|
+
/** Top vulnerabilities by severity (deduped across repos) */
|
|
648
|
+
topVulnerabilities: Array<{
|
|
649
|
+
id: string;
|
|
650
|
+
severity: Severity;
|
|
651
|
+
summary: string;
|
|
652
|
+
affectedRepos: string[];
|
|
653
|
+
fixedVersion?: string;
|
|
654
|
+
exploitedInWild: boolean;
|
|
655
|
+
}>;
|
|
656
|
+
/** Scan timestamp */
|
|
657
|
+
scannedAt: string;
|
|
658
|
+
/** Total scan duration in ms */
|
|
659
|
+
durationMs: number;
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* GitLab API client for listing and cloning repositories.
|
|
664
|
+
*
|
|
665
|
+
* Designed for self-hosted GitLab instances (e.g., git.solve.ch)
|
|
666
|
+
* but works with gitlab.com as well.
|
|
667
|
+
*/
|
|
668
|
+
|
|
669
|
+
declare class GitLabClient {
|
|
670
|
+
private baseUrl;
|
|
671
|
+
private token;
|
|
672
|
+
private apiUrl;
|
|
673
|
+
constructor(baseUrl: string, token: string);
|
|
674
|
+
/**
|
|
675
|
+
* Lists all accessible projects, paginated.
|
|
676
|
+
* Returns all pages concatenated.
|
|
677
|
+
*/
|
|
678
|
+
listAllProjects(options?: {
|
|
679
|
+
archived?: boolean;
|
|
680
|
+
perPage?: number;
|
|
681
|
+
maxPages?: number;
|
|
682
|
+
}): Promise<GitLabProject[]>;
|
|
683
|
+
/**
|
|
684
|
+
* Lists projects within a specific group (and its subgroups).
|
|
685
|
+
*/
|
|
686
|
+
listGroupProjects(groupPath: string, options?: {
|
|
687
|
+
includeSubgroups?: boolean;
|
|
688
|
+
perPage?: number;
|
|
689
|
+
}): Promise<GitLabProject[]>;
|
|
690
|
+
/**
|
|
691
|
+
* Lists all groups accessible to the token.
|
|
692
|
+
*/
|
|
693
|
+
listGroups(): Promise<GitLabGroup[]>;
|
|
694
|
+
/**
|
|
695
|
+
* Shallow-clones a repo into a temporary directory.
|
|
696
|
+
* Returns the path to the cloned repo.
|
|
697
|
+
*
|
|
698
|
+
* Uses HTTPS with token auth embedded in the URL
|
|
699
|
+
* (works for self-hosted GitLab with private-token).
|
|
700
|
+
*/
|
|
701
|
+
cloneToTemp(project: GitLabProject, branch?: string): string;
|
|
702
|
+
/**
|
|
703
|
+
* Removes a temporary clone directory.
|
|
704
|
+
*/
|
|
705
|
+
cleanupTemp(tempDir: string): void;
|
|
706
|
+
/**
|
|
707
|
+
* Builds an authenticated HTTPS URL for git clone.
|
|
708
|
+
* Embeds the token as oauth2 password.
|
|
709
|
+
*/
|
|
710
|
+
private buildAuthUrl;
|
|
711
|
+
/**
|
|
712
|
+
* Makes an authenticated GET request to the GitLab API.
|
|
713
|
+
*/
|
|
714
|
+
private fetch;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
/**
|
|
718
|
+
* GitLab scan orchestrator — clones each repo, scans with Verimu,
|
|
719
|
+
* aggregates results, and generates the report.
|
|
720
|
+
*
|
|
721
|
+
* Usage:
|
|
722
|
+
* const orchestrator = new GitLabOrchestrator();
|
|
723
|
+
* const result = await orchestrator.scanInstance(config);
|
|
724
|
+
*/
|
|
725
|
+
|
|
726
|
+
declare class GitLabOrchestrator {
|
|
727
|
+
private discovery;
|
|
728
|
+
/**
|
|
729
|
+
* Scans all accessible repos on a GitLab instance.
|
|
730
|
+
*/
|
|
731
|
+
scanInstance(config: GitLabScanConfig): Promise<GitLabScanResult>;
|
|
732
|
+
private filterProjects;
|
|
733
|
+
private matchGlob;
|
|
734
|
+
private aggregate;
|
|
735
|
+
private printSummary;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
/**
|
|
739
|
+
* HTML report generator for GitLab-wide scans.
|
|
740
|
+
*
|
|
741
|
+
* Generates a self-contained, single-file HTML report that can be
|
|
742
|
+
* attached to an email or opened in any browser. No external deps.
|
|
743
|
+
*/
|
|
744
|
+
|
|
745
|
+
declare class HtmlReporter {
|
|
746
|
+
readonly name = "html";
|
|
747
|
+
generate(result: GitLabScanResult): string;
|
|
748
|
+
private header;
|
|
749
|
+
private summaryCards;
|
|
750
|
+
private severityChart;
|
|
751
|
+
private topVulnerabilities;
|
|
752
|
+
private repoBreakdown;
|
|
753
|
+
private ecosystemBreakdown;
|
|
754
|
+
private craTimeline;
|
|
755
|
+
private footer;
|
|
756
|
+
private styles;
|
|
757
|
+
private escapeHtml;
|
|
758
|
+
private sevClass;
|
|
759
|
+
}
|
|
760
|
+
|
|
761
|
+
/**
|
|
762
|
+
* Types for the GitHub integration — remote scanning of GitHub.com
|
|
763
|
+
* or GitHub Enterprise Server (GHES) instances.
|
|
764
|
+
*/
|
|
765
|
+
|
|
766
|
+
/** GitHub repository as returned by the REST API */
|
|
767
|
+
interface GitHubRepo {
|
|
768
|
+
id: number;
|
|
769
|
+
name: string;
|
|
770
|
+
full_name: string;
|
|
771
|
+
private: boolean;
|
|
772
|
+
fork: boolean;
|
|
773
|
+
archived: boolean;
|
|
774
|
+
default_branch: string;
|
|
775
|
+
html_url: string;
|
|
776
|
+
clone_url: string;
|
|
777
|
+
owner: {
|
|
778
|
+
login: string;
|
|
779
|
+
type: 'User' | 'Organization';
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
/** GitHub user/org info as returned by GET /users/{username} */
|
|
783
|
+
interface GitHubUser {
|
|
784
|
+
login: string;
|
|
785
|
+
id: number;
|
|
786
|
+
type: 'User' | 'Organization';
|
|
787
|
+
name: string | null;
|
|
788
|
+
public_repos: number;
|
|
789
|
+
}
|
|
790
|
+
/** Configuration for a GitHub-wide scan */
|
|
791
|
+
interface GitHubScanConfig {
|
|
792
|
+
/** GitHub base URL (default: https://github.com, supports GHES) */
|
|
793
|
+
baseUrl: string;
|
|
794
|
+
/** Org/user profile to enumerate repos (URL or handle) */
|
|
795
|
+
profile: string;
|
|
796
|
+
/** Personal access token or fine-grained token */
|
|
797
|
+
token?: string;
|
|
798
|
+
/** For user profiles, list only owner repositories (default: false) */
|
|
799
|
+
ownerOnly?: boolean;
|
|
800
|
+
/** Exclude forked repositories (default: false) */
|
|
801
|
+
excludeForks?: boolean;
|
|
802
|
+
/** Exclude archived repositories (default: true) */
|
|
803
|
+
excludeArchived?: boolean;
|
|
804
|
+
/** Maximum number of repos to scan */
|
|
805
|
+
maxRepos?: number;
|
|
806
|
+
/** Branch to clone (default: each repo's default branch) */
|
|
807
|
+
branch?: string;
|
|
808
|
+
/** Where to write the HTML report */
|
|
809
|
+
htmlOutput?: string;
|
|
810
|
+
/** Where to write the JSON aggregate report */
|
|
811
|
+
jsonOutput?: string;
|
|
812
|
+
/** Skip CVE checking (just discover dependencies) */
|
|
813
|
+
skipCveCheck?: boolean;
|
|
814
|
+
/** Verimu API key for platform upload */
|
|
815
|
+
apiKey?: string;
|
|
816
|
+
/** Verimu API base URL */
|
|
817
|
+
apiBaseUrl?: string;
|
|
818
|
+
/** Group name for Verimu platform */
|
|
819
|
+
groupName?: string;
|
|
820
|
+
}
|
|
821
|
+
/** Result of scanning a single GitHub repo */
|
|
822
|
+
interface GitHubRepoScanResult {
|
|
823
|
+
/** GitHub repo metadata */
|
|
824
|
+
repo: GitHubRepo;
|
|
825
|
+
/** Verimu scan reports (one per discovered project in the repo) */
|
|
826
|
+
reports: VerimuReport[];
|
|
827
|
+
/** Whether any lockfile was found in the repo */
|
|
828
|
+
hasLockfile: boolean;
|
|
829
|
+
/** Error message if scan failed */
|
|
830
|
+
error?: string;
|
|
831
|
+
/** Time taken for this repo (clone + scan + cleanup) in ms */
|
|
832
|
+
durationMs: number;
|
|
833
|
+
}
|
|
834
|
+
/** Aggregate result of scanning all GitHub repos */
|
|
835
|
+
interface GitHubScanResult {
|
|
836
|
+
/** GitHub base URL */
|
|
837
|
+
instanceUrl: string;
|
|
838
|
+
/** Profile that was scanned (org or user login) */
|
|
839
|
+
profile: string;
|
|
840
|
+
/** Owner type that was resolved */
|
|
841
|
+
profileType: 'org' | 'user';
|
|
842
|
+
/** Total repositories discovered */
|
|
843
|
+
totalReposDiscovered: number;
|
|
844
|
+
/** Repos that were scanned (had lockfiles) */
|
|
845
|
+
scannedRepos: GitHubRepoScanResult[];
|
|
846
|
+
/** Repos skipped (no lockfile, archived, forked, excluded) */
|
|
847
|
+
skippedRepos: Array<{
|
|
848
|
+
repo: GitHubRepo;
|
|
849
|
+
reason: string;
|
|
850
|
+
}>;
|
|
851
|
+
/** Repos that failed to scan */
|
|
852
|
+
failedRepos: Array<{
|
|
853
|
+
repo: GitHubRepo;
|
|
854
|
+
error: string;
|
|
855
|
+
}>;
|
|
856
|
+
/** Aggregate vulnerability summary across all repos */
|
|
857
|
+
summary: {
|
|
858
|
+
totalRepos: number;
|
|
859
|
+
reposWithVulnerabilities: number;
|
|
860
|
+
totalDependencies: number;
|
|
861
|
+
totalVulnerabilities: number;
|
|
862
|
+
critical: number;
|
|
863
|
+
high: number;
|
|
864
|
+
medium: number;
|
|
865
|
+
low: number;
|
|
866
|
+
exploitedInWild: number;
|
|
867
|
+
ecosystemBreakdown: Record<string, number>;
|
|
868
|
+
};
|
|
869
|
+
/** Top vulnerabilities by severity (deduped across repos) */
|
|
870
|
+
topVulnerabilities: Array<{
|
|
871
|
+
id: string;
|
|
872
|
+
severity: Severity;
|
|
873
|
+
summary: string;
|
|
874
|
+
affectedRepos: string[];
|
|
875
|
+
fixedVersion?: string;
|
|
876
|
+
exploitedInWild: boolean;
|
|
877
|
+
}>;
|
|
878
|
+
/** Scan timestamp */
|
|
879
|
+
scannedAt: string;
|
|
880
|
+
/** Total scan duration in ms */
|
|
881
|
+
durationMs: number;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
/**
|
|
885
|
+
* GitHub API client for listing and cloning repositories.
|
|
886
|
+
*
|
|
887
|
+
* Supports github.com and GitHub Enterprise Server (GHES).
|
|
888
|
+
* Handles both authenticated (5,000 req/h) and unauthenticated (60 req/h)
|
|
889
|
+
* rate limits, with automatic wait-and-retry on transient errors.
|
|
890
|
+
*/
|
|
891
|
+
|
|
892
|
+
interface RateLimitInfo {
|
|
893
|
+
limit: number;
|
|
894
|
+
remaining: number;
|
|
895
|
+
resetAt: Date;
|
|
896
|
+
used: number;
|
|
897
|
+
}
|
|
898
|
+
interface ParsedProfile {
|
|
899
|
+
/** The login/handle extracted from the URL or raw input */
|
|
900
|
+
login: string;
|
|
901
|
+
}
|
|
902
|
+
/**
|
|
903
|
+
* Parses a GitHub profile input which can be:
|
|
904
|
+
* - A full URL: https://github.com/octokit
|
|
905
|
+
* - A URL with trailing slash/params: https://github.com/octokit/?tab=repos
|
|
906
|
+
* - A bare handle: octokit
|
|
907
|
+
*/
|
|
908
|
+
declare function parseProfile(input: string, baseUrl: string): ParsedProfile;
|
|
909
|
+
declare class GitHubClient {
|
|
910
|
+
private baseUrl;
|
|
911
|
+
private apiUrl;
|
|
912
|
+
private token?;
|
|
913
|
+
private lastRateLimit?;
|
|
914
|
+
constructor(baseUrl: string, token?: string);
|
|
915
|
+
/**
|
|
916
|
+
* Determines whether a login is a User or Organization by
|
|
917
|
+
* calling GET /users/{username} and reading the `type` field.
|
|
918
|
+
*/
|
|
919
|
+
detectOwnerType(login: string): Promise<'org' | 'user'>;
|
|
920
|
+
/**
|
|
921
|
+
* Lists repositories for an organization.
|
|
922
|
+
* Uses GET /orgs/{org}/repos with pagination.
|
|
923
|
+
*/
|
|
924
|
+
listOrgRepos(org: string): Promise<GitHubRepo[]>;
|
|
925
|
+
/**
|
|
926
|
+
* Lists repositories for a user.
|
|
927
|
+
*
|
|
928
|
+
* - Without token: GET /users/{username}/repos
|
|
929
|
+
* - default: type=all
|
|
930
|
+
* - ownerOnly: type=owner
|
|
931
|
+
* - With token for own user: GET /user/repos filtered by owner login
|
|
932
|
+
* (includes private repos the token can see)
|
|
933
|
+
* - With token for other user: GET /users/{username}/repos
|
|
934
|
+
* (only public repos visible)
|
|
935
|
+
*/
|
|
936
|
+
listUserRepos(login: string, ownerOnly?: boolean): Promise<GitHubRepo[]>;
|
|
937
|
+
/**
|
|
938
|
+
* Lists repos based on resolved owner type.
|
|
939
|
+
*/
|
|
940
|
+
listRepos(login: string, ownerType: 'org' | 'user', options?: {
|
|
941
|
+
ownerOnly?: boolean;
|
|
942
|
+
}): Promise<GitHubRepo[]>;
|
|
943
|
+
/**
|
|
944
|
+
* Shallow-clones a repo into a temporary directory.
|
|
945
|
+
* Returns the path to the cloned repo.
|
|
946
|
+
*
|
|
947
|
+
* Uses HTTPS with token auth embedded in the URL (when token is available).
|
|
948
|
+
*/
|
|
949
|
+
cloneToTemp(repo: GitHubRepo, branch?: string): string;
|
|
950
|
+
/**
|
|
951
|
+
* Removes a temporary clone directory.
|
|
952
|
+
*/
|
|
953
|
+
cleanupTemp(tempDir: string): void;
|
|
954
|
+
/** Returns the last observed rate limit info, if any. */
|
|
955
|
+
getRateLimit(): RateLimitInfo | undefined;
|
|
956
|
+
/**
|
|
957
|
+
* Returns the hourly rate limit for this client configuration.
|
|
958
|
+
* - Unauthenticated: 60 requests/hour
|
|
959
|
+
* - Authenticated (PAT/OAuth): 5,000 requests/hour
|
|
960
|
+
*/
|
|
961
|
+
getExpectedRateLimit(): number;
|
|
962
|
+
/**
|
|
963
|
+
* Paginated GET — fetches all pages of a list endpoint.
|
|
964
|
+
* GitHub uses `per_page` (max 100) and `page` parameters.
|
|
965
|
+
*/
|
|
966
|
+
private paginate;
|
|
967
|
+
/**
|
|
968
|
+
* Builds an authenticated HTTPS URL for git clone.
|
|
969
|
+
* Embeds the token as a password with "x-access-token" user.
|
|
970
|
+
*/
|
|
971
|
+
private buildAuthUrl;
|
|
972
|
+
/**
|
|
973
|
+
* Makes an authenticated GET request to the GitHub API.
|
|
974
|
+
*
|
|
975
|
+
* Rate limit handling:
|
|
976
|
+
* - Reads X-RateLimit-Remaining and X-RateLimit-Reset headers
|
|
977
|
+
* - If remaining is 0, waits until the reset time or throws with actionable message
|
|
978
|
+
* - Retries on transient 502/503/504 with exponential backoff (up to 3 retries)
|
|
979
|
+
* - Returns 403/429 rate limit errors with reset time information
|
|
980
|
+
*/
|
|
981
|
+
private fetch;
|
|
982
|
+
/**
|
|
983
|
+
* Updates internal rate limit tracker from response headers.
|
|
984
|
+
*/
|
|
985
|
+
private updateRateLimit;
|
|
986
|
+
private sleep;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* GitHub scan orchestrator — clones each repo, scans with Verimu,
|
|
991
|
+
* aggregates results, and generates the report.
|
|
992
|
+
*
|
|
993
|
+
*
|
|
994
|
+
* Usage:
|
|
995
|
+
* const orchestrator = new GitHubOrchestrator();
|
|
996
|
+
* const result = await orchestrator.scanProfile(config);
|
|
997
|
+
*/
|
|
998
|
+
|
|
999
|
+
declare class GitHubOrchestrator {
|
|
1000
|
+
private discovery;
|
|
1001
|
+
/**
|
|
1002
|
+
* Scans all repos for a GitHub profile (org or user).
|
|
1003
|
+
*/
|
|
1004
|
+
scanProfile(config: GitHubScanConfig): Promise<GitHubScanResult>;
|
|
1005
|
+
private filterRepos;
|
|
1006
|
+
private getUploadProjectName;
|
|
1007
|
+
private getAutoGroupName;
|
|
1008
|
+
private aggregate;
|
|
1009
|
+
private printSummary;
|
|
1010
|
+
}
|
|
1011
|
+
|
|
523
1012
|
/** Base error for all Verimu errors */
|
|
524
1013
|
declare class VerimuError extends Error {
|
|
525
1014
|
readonly code: string;
|
|
@@ -1511,4 +2000,4 @@ declare class UsageContextEngine {
|
|
|
1511
2000
|
private normalizePositiveInt;
|
|
1512
2001
|
}
|
|
1513
2002
|
|
|
1514
|
-
export { ApiKeyRequiredError, CargoScanner, type CiProvider, ComposerScanner, ConsoleReporter, CveAggregator, type CveCheckResult, CveSourceError, CycloneDxGenerator, DenoScanner, type Dependency, type Ecosystem, type GenerateSbomInput, type GenerateSbomResult, type GenerateSpdxSbomResult, type GenerateSwidTagResult, GoScanner, LockfileParseError, MavenScanner, NoLockfileError, NpmScanner, NugetScanner, OsvSource, PipScanner, PnpmScanner, RubyScanner, type Sbom, type SbomArtifacts, type SbomDependency, type SbomFormat, type SbomSource, type ScanResult, ScannerRegistry, type Severity, SpdxJsonGenerator, SwidTagGenerator, type UploadResult, type UsageContextEcosystemStatus, UsageContextEngine, type UsageContextError, type UsageContextLlmPayload, type UsageContextResult, type UsageContextStatus, type UsageContextVulnerabilityFinding, type UsageSnippet, type UsageSnippetMatchKind, VerimuApiClient, type VerimuConfig, VerimuError, type VerimuReport, type Vulnerability, type VulnerabilitySource, YarnScanner, detectSource, generateSbom, generateSbomArtifacts, generateSpdxSbom, generateSwidTag, printReport, scan, shouldFailCi, uploadToVerimu };
|
|
2003
|
+
export { ApiKeyRequiredError, CargoScanner, type CiProvider, ComposerScanner, ConsoleReporter, CveAggregator, type CveCheckResult, CveSourceError, CycloneDxGenerator, DenoScanner, type Dependency, type Ecosystem, type GenerateSbomInput, type GenerateSbomResult, type GenerateSpdxSbomResult, type GenerateSwidTagResult, GitHubClient, GitHubOrchestrator, type GitHubRepo, type GitHubRepoScanResult, type GitHubScanConfig, type GitHubScanResult, type GitHubUser, GitLabClient, type GitLabGroup, GitLabOrchestrator, type GitLabProject, type GitLabRepoScanResult, type GitLabScanConfig, type GitLabScanResult, GoScanner, HtmlReporter, LockfileParseError, MavenScanner, NoLockfileError, NpmScanner, NugetScanner, OsvSource, PipScanner, PnpmScanner, RubyScanner, type Sbom, type SbomArtifacts, type SbomDependency, type SbomFormat, type SbomSource, type ScanResult, ScannerRegistry, type Severity, SpdxJsonGenerator, SwidTagGenerator, type UploadResult, type UsageContextEcosystemStatus, UsageContextEngine, type UsageContextError, type UsageContextLlmPayload, type UsageContextResult, type UsageContextStatus, type UsageContextVulnerabilityFinding, type UsageSnippet, type UsageSnippetMatchKind, VerimuApiClient, type VerimuConfig, VerimuError, type VerimuReport, type Vulnerability, type VulnerabilitySource, YarnScanner, detectSource, generateSbom, generateSbomArtifacts, generateSpdxSbom, generateSwidTag, parseProfile, printReport, scan, shouldFailCi, uploadToVerimu };
|