|
| 1 | +# CLI Reference |
| 2 | + |
| 3 | +This section provides a detailed reference for all Gatecheck CLI commands, including subcommands, options, examples, and use cases. |
| 4 | + |
| 5 | +## gatecheck |
| 6 | + |
| 7 | +The root command. Displays help information. |
| 8 | + |
| 9 | +**Usage:** |
| 10 | +``` |
| 11 | +gatecheck [command] |
| 12 | +``` |
| 13 | + |
| 14 | +**Use Case:** Entry point to access all functionalities. Run without arguments to see available commands. |
| 15 | + |
| 16 | +## gatecheck bundle |
| 17 | + |
| 18 | +Manage Gatecheck bundles (.gcb files) which aggregate multiple security reports. |
| 19 | + |
| 20 | +### gatecheck bundle new |
| 21 | + |
| 22 | +Create a new empty bundle file. |
| 23 | + |
| 24 | +**Usage:** |
| 25 | +``` |
| 26 | +gatecheck bundle new <bundle-file> |
| 27 | +``` |
| 28 | + |
| 29 | +**Example:** |
| 30 | +``` |
| 31 | +gatecheck bundle new myproject.gcb |
| 32 | +``` |
| 33 | + |
| 34 | +**Use Case:** Initialize a new bundle before adding reports, useful for starting a new attestation or archive. |
| 35 | + |
| 36 | +### gatecheck bundle add |
| 37 | + |
| 38 | +Add a report to an existing bundle. |
| 39 | + |
| 40 | +**Usage:** |
| 41 | +``` |
| 42 | +gatecheck bundle add <bundle-file> <report-file> --type <report-type> |
| 43 | +``` |
| 44 | + |
| 45 | +**Options:** |
| 46 | +- `--type`: Specify report type (e.g., grype, cyclonedx, semgrep, gitleaks) |
| 47 | + |
| 48 | +**Example:** |
| 49 | +``` |
| 50 | +gatecheck bundle add myproject.gcb grype-report.json --type grype |
| 51 | +``` |
| 52 | + |
| 53 | +**Use Case:** Aggregate reports from different tools into one file for easy sharing, auditing, or CI/CD integration. |
| 54 | + |
| 55 | +### gatecheck bundle list |
| 56 | + |
| 57 | +List the contents of a bundle. |
| 58 | + |
| 59 | +**Usage:** |
| 60 | +``` |
| 61 | +gatecheck bundle list <bundle-file> |
| 62 | +``` |
| 63 | + |
| 64 | +**Example:** |
| 65 | +``` |
| 66 | +gatecheck bundle list myproject.gcb |
| 67 | +``` |
| 68 | + |
| 69 | +**Use Case:** Quickly inspect what reports are in a bundle without extracting them, helpful for verification. |
| 70 | + |
| 71 | +## gatecheck config |
| 72 | + |
| 73 | +Manage configuration files for validation. |
| 74 | + |
| 75 | +### gatecheck config new |
| 76 | + |
| 77 | +Generate a new default configuration file. |
| 78 | + |
| 79 | +**Usage:** |
| 80 | +``` |
| 81 | +gatecheck config new <config-file> [--format yaml|json|toml] |
| 82 | +``` |
| 83 | + |
| 84 | +**Example:** |
| 85 | +``` |
| 86 | +gatecheck config new gatecheck.yaml |
| 87 | +``` |
| 88 | + |
| 89 | +**Use Case:** Create a starting point for defining validation rules, then customize thresholds for your project. |
| 90 | + |
| 91 | +## gatecheck download |
| 92 | + |
| 93 | +Download external datasets like EPSS or KEV. |
| 94 | + |
| 95 | +**Usage:** |
| 96 | +``` |
| 97 | +gatecheck download <type> <output-file> |
| 98 | +``` |
| 99 | + |
| 100 | +**Types:** epss, kev |
| 101 | + |
| 102 | +**Example:** |
| 103 | +``` |
| 104 | +gatecheck download epss epss_scores.csv |
| 105 | +``` |
| 106 | + |
| 107 | +**Use Case:** Fetch latest vulnerability scoring data for offline use in validation or analysis. |
| 108 | + |
| 109 | +## gatecheck list |
| 110 | + |
| 111 | +List contents of a report or bundle in a human-readable format. |
| 112 | + |
| 113 | +**Usage:** |
| 114 | +``` |
| 115 | +gatecheck list <file> [--input-type <type>] |
| 116 | +``` |
| 117 | + |
| 118 | +**Example:** |
| 119 | +``` |
| 120 | +gatecheck list grype-report.json |
| 121 | +``` |
| 122 | + |
| 123 | +**Use Case:** Summarize lengthy JSON reports for quick review, e.g., checking vulnerability counts without parsing JSON manually. |
| 124 | + |
| 125 | +## gatecheck validate |
| 126 | + |
| 127 | +Validate reports against a configuration file. |
| 128 | + |
| 129 | +**Usage:** |
| 130 | +``` |
| 131 | +gatecheck validate <config-file> <target-file> |
| 132 | +``` |
| 133 | + |
| 134 | +**Example:** |
| 135 | +``` |
| 136 | +gatecheck validate gatecheck.yaml bundle.gcb |
| 137 | +``` |
| 138 | + |
| 139 | +**Use Case:** Ensure security reports meet project thresholds before deployment, integrating into CI pipelines for automated checks. |
| 140 | + |
| 141 | +## gatecheck version |
| 142 | + |
| 143 | +Print the version information. |
| 144 | + |
| 145 | +**Usage:** |
| 146 | +``` |
| 147 | +gatecheck version |
| 148 | +``` |
| 149 | + |
| 150 | +**Example:** |
| 151 | +``` |
| 152 | +gatecheck version |
| 153 | +``` |
| 154 | + |
| 155 | +**Use Case:** Verify the installed version for compatibility or reporting issues. |
0 commit comments