UNPKG

pact-audit-free

Version:

Free smart contract security scanner using Slither static analysis

32 lines 1.1 kB
#!/usr/bin/env node "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const commander_1 = require("commander"); const scanner_1 = require("./scanner"); const program = new commander_1.Command(); // CLI Configuration program .name('pact-audit-free') .description('Free smart contract security scanner using Slither static analysis') .version('1.0.0'); // Main scan command program .command('scan') .description('Scan Solidity files or directories for security vulnerabilities') .argument('<target>', 'Path to Solidity file (.sol) or directory containing Solidity files') .option('-o, --output <path>', 'Save results to JSON file') .option('--json', 'Output results as JSON to stdout') .action(async (target, options) => { await (0, scanner_1.scanContract)(target, options); }); // Show help when no command is provided program.action(() => { program.help(); }); // Parse CLI arguments program.parse(); // If no arguments provided, show help if (!process.argv.slice(2).length) { program.help(); } //# sourceMappingURL=index.js.map