@kinosec/cli 0.10.2 → 0.10.3

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.js CHANGED
@@ -8435,13 +8435,10 @@ ${import_picocolors3.default.dim("use of its services.")}
8435
8435
  var import_picocolors4 = __toESM(require_picocolors(), 1);
8436
8436
 
8437
8437
  // src/lib/validate-mode.ts
8438
+ var VALID_SCAN_MODES = ["full", "quick", "htb", "defcon"];
8438
8439
  function validateScanMode(mode) {
8439
- if (mode === "quick") {
8440
- console.error("Quick mode is temporarily unavailable. Please use --mode full (the default).");
8441
- process.exit(2);
8442
- }
8443
- if (mode !== "full") {
8444
- console.error(`Invalid mode "${mode}". Must be: full`);
8440
+ if (!VALID_SCAN_MODES.includes(mode)) {
8441
+ console.error(`Invalid mode "${mode}". Must be one of: ${VALID_SCAN_MODES.join(", ")}.`);
8445
8442
  process.exit(2);
8446
8443
  }
8447
8444
  }
@@ -12566,7 +12563,7 @@ function parseTarget(input) {
12566
12563
 
12567
12564
  // src/commands/pentest.ts
12568
12565
  function registerPentestCommand(program3) {
12569
- const pentest = program3.command("pentest").description("Run and manage pentests").option("-t, --target <domain>", "Target domain to pentest").option("--profile <id>", "Pentest profile ID (alternative to --target)").option("--mode <mode>", "Pentest mode", "full").option("-y, --yes", "Accept authorization terms without prompting").option("--no-watch", "Skip auto-watch after starting the pentest").option("--deployment <type>", "Deployment type: cloud or on-prem", "cloud").option("--include <hosts>", "Include only these subdomains (comma-separated)").option("--exclude <hosts>", "Exclude these subdomains (comma-separated)").option("--scope <action>", "Scope action: clear").addHelpText("after", `
12566
+ const pentest = program3.command("pentest").description("Run and manage pentests").option("-t, --target <domain>", "Target domain to pentest").option("--profile <id>", "Pentest profile ID (alternative to --target)").option("--mode <mode>", "Pentest mode: full, quick, htb, or defcon", "full").option("--flag <prefix>", "CTF flag prefix (defcon mode only, default HTB)").option("--context <text>", "CTF focus hint (defcon mode only)").option("-y, --yes", "Accept authorization terms without prompting").option("--no-watch", "Skip auto-watch after starting the pentest").option("--deployment <type>", "Deployment type: cloud or on-prem", "cloud").option("--include <hosts>", "Include only these subdomains (comma-separated)").option("--exclude <hosts>", "Exclude these subdomains (comma-separated)").option("--scope <action>", "Scope action: clear").addHelpText("after", `
12570
12567
  Examples:
12571
12568
  $ kinosec pentest -t delikado.org
12572
12569
  $ kinosec pentest --profile abc123
@@ -12642,6 +12639,12 @@ Examples:
12642
12639
  asset_id: asset.id,
12643
12640
  scan_mode: options.mode
12644
12641
  };
12642
+ if (options.mode === "defcon") {
12643
+ assetParams.flag_format = options.flag ?? "HTB";
12644
+ if (options.context) assetParams.ctf_context = options.context;
12645
+ } else if (options.flag || options.context) {
12646
+ console.error("Warning: --flag/--context apply only to --mode defcon; ignoring.");
12647
+ }
12645
12648
  if (options.deployment !== "cloud") {
12646
12649
  assetParams.deployment_type = options.deployment;
12647
12650
  }
@@ -13790,7 +13793,7 @@ Examples:
13790
13793
 
13791
13794
  // src/cli.ts
13792
13795
  var program2 = new Command();
13793
- program2.name("kinosec").description("KinoSec CLI \u2014 run pentests from your terminal").version("0.10.2", "-v, --version").option("--token <pat>", "API token (overrides KINOSEC_TOKEN)").option("--output <format>", "Output format: text or json", "text").option("--json", "Shorthand for --output json").option("--no-color", "Disable colors");
13796
+ program2.name("kinosec").description("KinoSec CLI \u2014 run pentests from your terminal").version("0.10.3", "-v, --version").option("--token <pat>", "API token (overrides KINOSEC_TOKEN)").option("--output <format>", "Output format: text or json", "text").option("--json", "Shorthand for --output json").option("--no-color", "Disable colors");
13794
13797
  registerAuthCommand(program2);
13795
13798
  registerMeCommand(program2);
13796
13799
  registerCreditsCommand(program2);
@@ -13799,7 +13802,7 @@ registerAssetCommand(program2);
13799
13802
  registerFindingCommand(program2);
13800
13803
  registerReportCommand(program2);
13801
13804
  registerTokenCommand(program2);
13802
- program2.parseAsync(process.argv).then(() => checkForUpdate("0.10.2")).catch(handleError);
13805
+ program2.parseAsync(process.argv).then(() => checkForUpdate("0.10.3")).catch(handleError);
13803
13806
  /*! Bundled license information:
13804
13807
 
13805
13808
  ky/distribution/index.js: