sin-bugbounty / src /metadata.ts
GitHub Actions
Deploy SIN-BugBounty from GitHub Actions
9db1674
Raw
History Blame Contribute Delete
2.97 kB
import process from 'node:process';
export const TEMPLATE_AGENT_ID = 'sin-bugbounty';
export const TEMPLATE_AGENT_NAMESPACE = 'bugbounty';
export const TEMPLATE_AGENT_NAME = 'SIN-BugBounty';
export const TEMPLATE_AGENT_DESCRIPTION = 'CEO Elite Bounty Hunter — uses sin-google-apps and webauto-nodriver-mcp to autonomously discover, validate, and submit high-value security vulnerabilities to bug bounty programs.';
export const TEMPLATE_AGENT_VERSION = '2026.03.22';
export const TEMPLATE_AGENT_DEFAULT_HOST = '127.0.0.1';
export const TEMPLATE_AGENT_DEFAULT_PORT = 46001;
export const TEMPLATE_AGENT_SKILLS = [
{
id: 'sin.bugbounty.health',
name: 'Health',
description: 'Check CEO Elite Bounty Hunter readiness, model, and capabilities.',
},
{
id: 'sin.bugbounty.recon.start',
name: 'Recon Start',
description: 'Fetch bug bounty scope and credentials via sin-google-apps, log into the platform via webauto-nodriver-mcp, and initiate reconnaissance.',
},
{
id: 'sin.bugbounty.hunt',
name: 'Hunt',
description: 'Hunt for vulnerabilities on a target scope using advanced recon, fuzzing, and architectural logic reviews. Build reproducible PoCs.',
},
{
id: 'sin.bugbounty.report.submit',
name: 'Report Submit',
description: 'Compile vulnerability findings into a premium bug bounty report and submit via the platform UI using webauto-nodriver-mcp.',
},
] as const;
export function resolveTemplateAgentConfig() {
const host =
process.env.SIN_BUGBOUNTY_HOST?.trim() ||
(process.env.PORT ? '0.0.0.0' : process.env.HOST?.trim() || TEMPLATE_AGENT_DEFAULT_HOST);
const port = parseInteger(process.env.SIN_BUGBOUNTY_PORT, parseInteger(process.env.PORT, TEMPLATE_AGENT_DEFAULT_PORT));
const fallbackPublicHost = host === '0.0.0.0' ? '127.0.0.1' : host;
const publicBaseUrl =
process.env.SIN_BUGBOUNTY_PUBLIC_BASE_URL?.trim() ||
(process.env.SPACE_HOST?.trim() ? `https://${process.env.SPACE_HOST.trim()}` : `http://${fallbackPublicHost}:${port}`);
return { host, port, publicBaseUrl: publicBaseUrl.replace(/\/+$/, '') };
}
export function buildAgentCard(baseUrl: string) {
const normalizedBaseUrl = baseUrl.replace(/\/+$/, '');
const rpcUrl = `${normalizedBaseUrl}/a2a/v1`;
return {
name: TEMPLATE_AGENT_NAME,
description: TEMPLATE_AGENT_DESCRIPTION,
version: TEMPLATE_AGENT_VERSION,
documentationUrl: normalizedBaseUrl,
url: rpcUrl,
capabilities: { streaming: false, pushNotifications: false },
defaultInputModes: ['text/plain', 'application/json'],
defaultOutputModes: ['text/plain', 'application/json'],
skills: [...TEMPLATE_AGENT_SKILLS],
supportedInterfaces: [{ url: rpcUrl, protocolBinding: 'JSONRPC', protocolVersion: '1.0' }],
};
}
function parseInteger(input: string | undefined, fallback: number) {
const parsed = Number.parseInt(String(input || '').trim(), 10);
return Number.isFinite(parsed) ? parsed : fallback;
}