MCPcopy Create free account
hub / github.com/ShipSecAI/studio / execute

Function execute

worker/src/components/security/amass.ts:515–749  ·  view source on GitHub ↗
(
    {
      inputs,
      params,
    }: ExecutionPayload<z.infer<typeof inputSchema>, z.infer<typeof parameterSchema>>,
    context: ExecutionContext,
  )

Source from the content-addressed store, hash-verified

513 ],
514 },
515 async execute(
516 {
517 inputs,
518 params,
519 }: ExecutionPayload<z.infer<typeof inputSchema>, z.infer<typeof parameterSchema>>,
520 context: ExecutionContext,
521 ) {
522 const parsedParams = parameterSchema.parse(params);
523 const {
524 passive,
525 active,
526 bruteForce,
527 enableAlterations,
528 recursive,
529 minForRecursive,
530 maxDepth,
531 dnsQueryRate,
532 includeIps,
533 verbose,
534 demoMode,
535 timeoutMinutes,
536 resolvers,
537 dataSources,
538 customFlags,
539 } = parsedParams;
540
541 const trimmedCustomFlags =
542 typeof customFlags === 'string' && customFlags.length > 0 ? customFlags : null;
543 const customFlagArgs = trimmedCustomFlags ? splitCliArgs(trimmedCustomFlags) : [];
544
545 const effectiveDataSources = dataSources ?? DEFAULT_DATA_SOURCES_STRING;
546 const effectiveResolvers = resolvers ?? DEFAULT_RESOLVERS_STRING;
547
548 const optionsSummary = {
549 passive: passive ?? true,
550 active: active ?? false,
551 bruteForce: bruteForce ?? false,
552 enableAlterations: enableAlterations ?? false,
553 includeIps: includeIps ?? false,
554 recursive: recursive ?? false,
555 minForRecursive: minForRecursive ?? null,
556 maxDepth: maxDepth ?? null,
557 dnsQueryRate: dnsQueryRate ?? null,
558 verbose: verbose ?? false,
559 demoMode: demoMode ?? false,
560 timeoutMinutes: timeoutMinutes ?? 15,
561 resolvers: effectiveResolvers,
562 dataSources: effectiveDataSources,
563 customFlags: trimmedCustomFlags,
564 };
565
566 // Normalize domains
567 const normalisedDomains = inputs.domains
568 .map((domain) => domain.trim())
569 .filter((domain) => domain.length > 0);
570
571 const domainCount = normalisedDomains.length;
572

Callers

nothing calls this directly

Calls 11

initializeMethod · 0.95
getVolumeConfigMethod · 0.95
cleanupMethod · 0.95
runComponentWithRunnerFunction · 0.90
generateFindingHashFunction · 0.90
buildAmassArgsFunction · 0.85
parseMethod · 0.80
infoMethod · 0.80
warnMethod · 0.80
fromMethod · 0.80
splitCliArgsFunction · 0.70

Tested by

no test coverage detected