@grc-claw/integration-marketplace 0.8.0
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/IntegrationMarketplace.d.ts +32 -0
- package/dist/IntegrationMarketplace.js +319 -0
- package/dist/connectors/ADPConnector.d.ts +12 -0
- package/dist/connectors/ADPConnector.js +97 -0
- package/dist/connectors/AWSCloudTrailConnector.d.ts +12 -0
- package/dist/connectors/AWSCloudTrailConnector.js +77 -0
- package/dist/connectors/AWSCloudWatchConnector.d.ts +12 -0
- package/dist/connectors/AWSCloudWatchConnector.js +70 -0
- package/dist/connectors/AWSGuardDutyConnector.d.ts +12 -0
- package/dist/connectors/AWSGuardDutyConnector.js +139 -0
- package/dist/connectors/AWSIAMConnector.d.ts +12 -0
- package/dist/connectors/AWSIAMConnector.js +90 -0
- package/dist/connectors/AWSKMSConnector.d.ts +12 -0
- package/dist/connectors/AWSKMSConnector.js +70 -0
- package/dist/connectors/AWSLambdaConnector.d.ts +12 -0
- package/dist/connectors/AWSLambdaConnector.js +84 -0
- package/dist/connectors/AWSRDSConnector.d.ts +12 -0
- package/dist/connectors/AWSRDSConnector.js +84 -0
- package/dist/connectors/AWSS3Connector.d.ts +12 -0
- package/dist/connectors/AWSS3Connector.js +112 -0
- package/dist/connectors/AkamaiConnector.d.ts +12 -0
- package/dist/connectors/AkamaiConnector.js +98 -0
- package/dist/connectors/ArgoCDConnector.d.ts +12 -0
- package/dist/connectors/ArgoCDConnector.js +93 -0
- package/dist/connectors/ArtifactoryConnector.d.ts +12 -0
- package/dist/connectors/ArtifactoryConnector.js +94 -0
- package/dist/connectors/AtlassianJiraConnector.d.ts +12 -0
- package/dist/connectors/AtlassianJiraConnector.js +134 -0
- package/dist/connectors/Auth0Connector.d.ts +12 -0
- package/dist/connectors/Auth0Connector.js +150 -0
- package/dist/connectors/AzureADConnector.d.ts +12 -0
- package/dist/connectors/AzureADConnector.js +115 -0
- package/dist/connectors/AzureDevOpsConnector.d.ts +12 -0
- package/dist/connectors/AzureDevOpsConnector.js +130 -0
- package/dist/connectors/AzureDevOpsPipelinesConnector.d.ts +12 -0
- package/dist/connectors/AzureDevOpsPipelinesConnector.js +72 -0
- package/dist/connectors/AzurePipelinesConnector.d.ts +12 -0
- package/dist/connectors/AzurePipelinesConnector.js +72 -0
- package/dist/connectors/AzurePolicyConnector.d.ts +12 -0
- package/dist/connectors/AzurePolicyConnector.js +141 -0
- package/dist/connectors/AzureReposConnector.d.ts +12 -0
- package/dist/connectors/AzureReposConnector.js +96 -0
- package/dist/connectors/AzureSentinelConnector.d.ts +12 -0
- package/dist/connectors/AzureSentinelConnector.js +88 -0
- package/dist/connectors/BambooCICDConnector.d.ts +12 -0
- package/dist/connectors/BambooCICDConnector.js +72 -0
- package/dist/connectors/BambooHRConnector.d.ts +12 -0
- package/dist/connectors/BambooHRConnector.js +84 -0
- package/dist/connectors/BeyondTrustConnector.d.ts +12 -0
- package/dist/connectors/BeyondTrustConnector.js +94 -0
- package/dist/connectors/BitbucketConnector.d.ts +12 -0
- package/dist/connectors/BitbucketConnector.js +100 -0
- package/dist/connectors/BitbucketPipelinesConnector.d.ts +12 -0
- package/dist/connectors/BitbucketPipelinesConnector.js +72 -0
- package/dist/connectors/BoxConnector.d.ts +12 -0
- package/dist/connectors/BoxConnector.js +122 -0
- package/dist/connectors/BuildkiteConnector.d.ts +12 -0
- package/dist/connectors/BuildkiteConnector.js +95 -0
- package/dist/connectors/CarbonBlackConnector.d.ts +12 -0
- package/dist/connectors/CarbonBlackConnector.js +89 -0
- package/dist/connectors/CassandraConnector.d.ts +12 -0
- package/dist/connectors/CassandraConnector.js +69 -0
- package/dist/connectors/CheckPointConnector.d.ts +12 -0
- package/dist/connectors/CheckPointConnector.js +98 -0
- package/dist/connectors/CircleCIConnector.d.ts +12 -0
- package/dist/connectors/CircleCIConnector.js +129 -0
- package/dist/connectors/CircleCIConnectorsConnector.d.ts +12 -0
- package/dist/connectors/CircleCIConnectorsConnector.js +69 -0
- package/dist/connectors/CiscoUmbrellaConnector.d.ts +12 -0
- package/dist/connectors/CiscoUmbrellaConnector.js +96 -0
- package/dist/connectors/CloudBeesJenkinsConnector.d.ts +12 -0
- package/dist/connectors/CloudBeesJenkinsConnector.js +70 -0
- package/dist/connectors/CloudflareDNSConnector.d.ts +12 -0
- package/dist/connectors/CloudflareDNSConnector.js +71 -0
- package/dist/connectors/CloudflareWAFConnector.d.ts +12 -0
- package/dist/connectors/CloudflareWAFConnector.js +98 -0
- package/dist/connectors/ConfluenceConnector.d.ts +12 -0
- package/dist/connectors/ConfluenceConnector.js +101 -0
- package/dist/connectors/ConstantContactConnector.d.ts +12 -0
- package/dist/connectors/ConstantContactConnector.js +70 -0
- package/dist/connectors/CouchDBConnector.d.ts +12 -0
- package/dist/connectors/CouchDBConnector.js +69 -0
- package/dist/connectors/CrowdStrikeConnector.d.ts +12 -0
- package/dist/connectors/CrowdStrikeConnector.js +86 -0
- package/dist/connectors/CrowdStrikeFalconConnector.d.ts +12 -0
- package/dist/connectors/CrowdStrikeFalconConnector.js +92 -0
- package/dist/connectors/CrowdStrikeSpotlightConnector.d.ts +12 -0
- package/dist/connectors/CrowdStrikeSpotlightConnector.js +139 -0
- package/dist/connectors/CyberArkConnector.d.ts +12 -0
- package/dist/connectors/CyberArkConnector.js +95 -0
- package/dist/connectors/DatabricksConnector.d.ts +12 -0
- package/dist/connectors/DatabricksConnector.js +95 -0
- package/dist/connectors/DatadogConnector.d.ts +12 -0
- package/dist/connectors/DatadogConnector.js +110 -0
- package/dist/connectors/DigitalOceanConnector.d.ts +12 -0
- package/dist/connectors/DigitalOceanConnector.js +85 -0
- package/dist/connectors/DiscordConnector.d.ts +12 -0
- package/dist/connectors/DiscordConnector.js +98 -0
- package/dist/connectors/DockerHubConnector.d.ts +12 -0
- package/dist/connectors/DockerHubConnector.js +80 -0
- package/dist/connectors/DocuSignConnector.d.ts +12 -0
- package/dist/connectors/DocuSignConnector.js +96 -0
- package/dist/connectors/DriftConnector.d.ts +12 -0
- package/dist/connectors/DriftConnector.js +69 -0
- package/dist/connectors/DropboxConnector.d.ts +12 -0
- package/dist/connectors/DropboxConnector.js +127 -0
- package/dist/connectors/ESETConnector.d.ts +12 -0
- package/dist/connectors/ESETConnector.js +70 -0
- package/dist/connectors/ElasticsearchCloudConnector.d.ts +12 -0
- package/dist/connectors/ElasticsearchCloudConnector.js +70 -0
- package/dist/connectors/FSecureConnector.d.ts +12 -0
- package/dist/connectors/FSecureConnector.js +70 -0
- package/dist/connectors/FeatureFlagConnector.d.ts +12 -0
- package/dist/connectors/FeatureFlagConnector.js +70 -0
- package/dist/connectors/FluxCDConnector.d.ts +12 -0
- package/dist/connectors/FluxCDConnector.js +94 -0
- package/dist/connectors/ForgeRockConnector.d.ts +12 -0
- package/dist/connectors/ForgeRockConnector.js +95 -0
- package/dist/connectors/FortinetConnector.d.ts +12 -0
- package/dist/connectors/FortinetConnector.js +98 -0
- package/dist/connectors/FreshdeskConnector.d.ts +12 -0
- package/dist/connectors/FreshdeskConnector.js +71 -0
- package/dist/connectors/GCPBigQueryConnector.d.ts +12 -0
- package/dist/connectors/GCPBigQueryConnector.js +71 -0
- package/dist/connectors/GCPComputeConnector.d.ts +12 -0
- package/dist/connectors/GCPComputeConnector.js +87 -0
- package/dist/connectors/GCPConfigConnector.d.ts +12 -0
- package/dist/connectors/GCPConfigConnector.js +149 -0
- package/dist/connectors/GCPFirestoreConnector.d.ts +12 -0
- package/dist/connectors/GCPFirestoreConnector.js +71 -0
- package/dist/connectors/GCPIAMConnector.d.ts +12 -0
- package/dist/connectors/GCPIAMConnector.js +98 -0
- package/dist/connectors/GCPSCCConnector.d.ts +12 -0
- package/dist/connectors/GCPSCCConnector.js +94 -0
- package/dist/connectors/GitHubActionsConnector.d.ts +12 -0
- package/dist/connectors/GitHubActionsConnector.js +104 -0
- package/dist/connectors/GitHubConnector.d.ts +12 -0
- package/dist/connectors/GitHubConnector.js +135 -0
- package/dist/connectors/GitHubCopilotConnector.d.ts +12 -0
- package/dist/connectors/GitHubCopilotConnector.js +72 -0
- package/dist/connectors/GitLabCIConnector.d.ts +12 -0
- package/dist/connectors/GitLabCIConnector.js +71 -0
- package/dist/connectors/GitLabConnector.d.ts +12 -0
- package/dist/connectors/GitLabConnector.js +101 -0
- package/dist/connectors/GitLabSASTConnector.d.ts +12 -0
- package/dist/connectors/GitLabSASTConnector.js +130 -0
- package/dist/connectors/GoogleWorkspaceConnector.d.ts +12 -0
- package/dist/connectors/GoogleWorkspaceConnector.js +136 -0
- package/dist/connectors/HelmConnector.d.ts +12 -0
- package/dist/connectors/HelmConnector.js +94 -0
- package/dist/connectors/HubSpotConnector.d.ts +12 -0
- package/dist/connectors/HubSpotConnector.js +77 -0
- package/dist/connectors/IFTTTConnector.d.ts +12 -0
- package/dist/connectors/IFTTTConnector.js +70 -0
- package/dist/connectors/ImpervaConnector.d.ts +12 -0
- package/dist/connectors/ImpervaConnector.js +94 -0
- package/dist/connectors/InfluxDBConnector.d.ts +12 -0
- package/dist/connectors/InfluxDBConnector.js +70 -0
- package/dist/connectors/IntercomConnector.d.ts +12 -0
- package/dist/connectors/IntercomConnector.js +69 -0
- package/dist/connectors/JenkinsConnector.d.ts +12 -0
- package/dist/connectors/JenkinsConnector.js +96 -0
- package/dist/connectors/JiraConnector.d.ts +12 -0
- package/dist/connectors/JiraConnector.js +103 -0
- package/dist/connectors/KafkaConnector.d.ts +12 -0
- package/dist/connectors/KafkaConnector.js +70 -0
- package/dist/connectors/KasperskyConnector.d.ts +12 -0
- package/dist/connectors/KasperskyConnector.js +70 -0
- package/dist/connectors/KubernetesConnector.d.ts +12 -0
- package/dist/connectors/KubernetesConnector.js +109 -0
- package/dist/connectors/LaceworkConnector.d.ts +13 -0
- package/dist/connectors/LaceworkConnector.js +143 -0
- package/dist/connectors/LaunchDarklyConnector.d.ts +12 -0
- package/dist/connectors/LaunchDarklyConnector.js +86 -0
- package/dist/connectors/LinodeConnector.d.ts +12 -0
- package/dist/connectors/LinodeConnector.js +70 -0
- package/dist/connectors/LookerConnector.d.ts +12 -0
- package/dist/connectors/LookerConnector.js +94 -0
- package/dist/connectors/MailchimpConnector.d.ts +12 -0
- package/dist/connectors/MailchimpConnector.js +71 -0
- package/dist/connectors/MalwarebytesConnector.d.ts +12 -0
- package/dist/connectors/MalwarebytesConnector.js +85 -0
- package/dist/connectors/McAfeeConnector.d.ts +12 -0
- package/dist/connectors/McAfeeConnector.js +85 -0
- package/dist/connectors/Microsoft365Connector.d.ts +12 -0
- package/dist/connectors/Microsoft365Connector.js +139 -0
- package/dist/connectors/MongoDBConnector.d.ts +12 -0
- package/dist/connectors/MongoDBConnector.js +86 -0
- package/dist/connectors/NamelyConnector.d.ts +12 -0
- package/dist/connectors/NamelyConnector.js +97 -0
- package/dist/connectors/Neo4jConnector.d.ts +12 -0
- package/dist/connectors/Neo4jConnector.js +70 -0
- package/dist/connectors/NetSuiteConnector.d.ts +12 -0
- package/dist/connectors/NetSuiteConnector.js +94 -0
- package/dist/connectors/NetskopeConnector.d.ts +12 -0
- package/dist/connectors/NetskopeConnector.js +98 -0
- package/dist/connectors/NexusConnector.d.ts +12 -0
- package/dist/connectors/NexusConnector.js +93 -0
- package/dist/connectors/NotionConnector.d.ts +12 -0
- package/dist/connectors/NotionConnector.js +109 -0
- package/dist/connectors/OktaConnector.d.ts +12 -0
- package/dist/connectors/OktaConnector.js +123 -0
- package/dist/connectors/OktaSystemLogConnector.d.ts +12 -0
- package/dist/connectors/OktaSystemLogConnector.js +129 -0
- package/dist/connectors/OpsgenieConnector.d.ts +12 -0
- package/dist/connectors/OpsgenieConnector.js +70 -0
- package/dist/connectors/PagerDutyConnector.d.ts +12 -0
- package/dist/connectors/PagerDutyConnector.js +106 -0
- package/dist/connectors/PalantirConnector.d.ts +12 -0
- package/dist/connectors/PalantirConnector.js +95 -0
- package/dist/connectors/PaloAltoPrismaCloudConnector.d.ts +12 -0
- package/dist/connectors/PaloAltoPrismaCloudConnector.js +110 -0
- package/dist/connectors/PingFederateConnector.d.ts +12 -0
- package/dist/connectors/PingFederateConnector.js +97 -0
- package/dist/connectors/PostgreSQLCloudConnector.d.ts +12 -0
- package/dist/connectors/PostgreSQLCloudConnector.js +70 -0
- package/dist/connectors/PowerBIConnector.d.ts +12 -0
- package/dist/connectors/PowerBIConnector.js +95 -0
- package/dist/connectors/PrismaCloudConnector.d.ts +12 -0
- package/dist/connectors/PrismaCloudConnector.js +147 -0
- package/dist/connectors/QualysConnector.d.ts +12 -0
- package/dist/connectors/QualysConnector.js +96 -0
- package/dist/connectors/QualysScannerConnector.d.ts +12 -0
- package/dist/connectors/QualysScannerConnector.js +131 -0
- package/dist/connectors/QuickBooksConnector.d.ts +12 -0
- package/dist/connectors/QuickBooksConnector.js +97 -0
- package/dist/connectors/RabbitMQConnector.d.ts +12 -0
- package/dist/connectors/RabbitMQConnector.js +69 -0
- package/dist/connectors/RadwareConnector.d.ts +12 -0
- package/dist/connectors/RadwareConnector.js +94 -0
- package/dist/connectors/RedisCloudConnector.d.ts +12 -0
- package/dist/connectors/RedisCloudConnector.js +70 -0
- package/dist/connectors/RingCentralConnector.d.ts +12 -0
- package/dist/connectors/RingCentralConnector.js +94 -0
- package/dist/connectors/SAPSuccessFactorsConnector.d.ts +12 -0
- package/dist/connectors/SAPSuccessFactorsConnector.js +103 -0
- package/dist/connectors/SailPointConnector.d.ts +12 -0
- package/dist/connectors/SailPointConnector.js +97 -0
- package/dist/connectors/SalesforceConnector.d.ts +12 -0
- package/dist/connectors/SalesforceConnector.js +91 -0
- package/dist/connectors/SendGridConnector.d.ts +12 -0
- package/dist/connectors/SendGridConnector.js +69 -0
- package/dist/connectors/SentinelOneConnector.d.ts +12 -0
- package/dist/connectors/SentinelOneConnector.js +89 -0
- package/dist/connectors/ServiceNowConnector.d.ts +12 -0
- package/dist/connectors/ServiceNowConnector.js +123 -0
- package/dist/connectors/SlackConnector.d.ts +12 -0
- package/dist/connectors/SlackConnector.js +109 -0
- package/dist/connectors/SnowflakeConnector.d.ts +12 -0
- package/dist/connectors/SnowflakeConnector.js +105 -0
- package/dist/connectors/SnykConnector.d.ts +12 -0
- package/dist/connectors/SnykConnector.js +84 -0
- package/dist/connectors/SnykMonitorConnector.d.ts +12 -0
- package/dist/connectors/SnykMonitorConnector.js +131 -0
- package/dist/connectors/SophosConnector.d.ts +12 -0
- package/dist/connectors/SophosConnector.js +87 -0
- package/dist/connectors/SpinnakerConnector.d.ts +12 -0
- package/dist/connectors/SpinnakerConnector.js +70 -0
- package/dist/connectors/SplunkConnector.d.ts +12 -0
- package/dist/connectors/SplunkConnector.js +126 -0
- package/dist/connectors/StripeConnector.d.ts +12 -0
- package/dist/connectors/StripeConnector.js +97 -0
- package/dist/connectors/TableauConnector.d.ts +12 -0
- package/dist/connectors/TableauConnector.js +101 -0
- package/dist/connectors/TaniumConnector.d.ts +12 -0
- package/dist/connectors/TaniumConnector.js +97 -0
- package/dist/connectors/TeamCityConnector.d.ts +12 -0
- package/dist/connectors/TeamCityConnector.js +71 -0
- package/dist/connectors/TeamsConnector.d.ts +12 -0
- package/dist/connectors/TeamsConnector.js +96 -0
- package/dist/connectors/TenableIOConnector.d.ts +12 -0
- package/dist/connectors/TenableIOConnector.js +130 -0
- package/dist/connectors/TerraformCloudConnector.d.ts +12 -0
- package/dist/connectors/TerraformCloudConnector.js +106 -0
- package/dist/connectors/TravisCIConnector.d.ts +12 -0
- package/dist/connectors/TravisCIConnector.js +95 -0
- package/dist/connectors/TrendMicroConnector.d.ts +12 -0
- package/dist/connectors/TrendMicroConnector.js +85 -0
- package/dist/connectors/TwilioConnector.d.ts +12 -0
- package/dist/connectors/TwilioConnector.js +70 -0
- package/dist/connectors/VercelConnector.d.ts +12 -0
- package/dist/connectors/VercelConnector.js +70 -0
- package/dist/connectors/VultrConnector.d.ts +12 -0
- package/dist/connectors/VultrConnector.js +70 -0
- package/dist/connectors/WebexConnector.d.ts +12 -0
- package/dist/connectors/WebexConnector.js +94 -0
- package/dist/connectors/WizConnector.d.ts +12 -0
- package/dist/connectors/WizConnector.js +172 -0
- package/dist/connectors/WorkdayConnector.d.ts +12 -0
- package/dist/connectors/WorkdayConnector.js +100 -0
- package/dist/connectors/XeroConnector.d.ts +12 -0
- package/dist/connectors/XeroConnector.js +96 -0
- package/dist/connectors/ZapierConnector.d.ts +12 -0
- package/dist/connectors/ZapierConnector.js +70 -0
- package/dist/connectors/ZendeskConnector.d.ts +12 -0
- package/dist/connectors/ZendeskConnector.js +71 -0
- package/dist/connectors/ZenefitsConnector.d.ts +12 -0
- package/dist/connectors/ZenefitsConnector.js +93 -0
- package/dist/connectors/ZoomConnector.d.ts +12 -0
- package/dist/connectors/ZoomConnector.js +97 -0
- package/dist/connectors/ZscalerConnector.d.ts +12 -0
- package/dist/connectors/ZscalerConnector.js +97 -0
- package/dist/connectors/index.d.ts +150 -0
- package/dist/connectors/index.js +157 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +16 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/index.test.js +139 -0
- package/dist/types.d.ts +57 -0
- package/dist/types.js +8 -0
- package/package.json +33 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "azure-repos-policies",
|
|
5
|
+
name: "Repository Policies",
|
|
6
|
+
description: "Fetch branch policies and merge strategies",
|
|
7
|
+
evidenceCategories: ["access_control", "change_management"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "azure-repos-builds",
|
|
11
|
+
name: "Build Definitions",
|
|
12
|
+
description: "Fetch CI/CD build pipeline configurations",
|
|
13
|
+
evidenceCategories: ["change_management", "configuration"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "azure-repos-pr",
|
|
17
|
+
name: "Pull Request Policies",
|
|
18
|
+
description: "Fetch PR approval requirements and work item linking",
|
|
19
|
+
evidenceCategories: ["change_management", "access_control"],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "azure-repos-audit",
|
|
23
|
+
name: "Audit Events",
|
|
24
|
+
description: "Fetch repository audit log events",
|
|
25
|
+
evidenceCategories: ["monitoring", "access_control"],
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
export class AzureReposConnector {
|
|
29
|
+
id = "azure-repos";
|
|
30
|
+
name = "Azure Repos";
|
|
31
|
+
category = "version_control";
|
|
32
|
+
authType = "api_key";
|
|
33
|
+
capabilities = capabilities;
|
|
34
|
+
frameworks = [
|
|
35
|
+
"SOC2",
|
|
36
|
+
"ISO27001",
|
|
37
|
+
"NIST_CSF",
|
|
38
|
+
"PCI_DSS",
|
|
39
|
+
];
|
|
40
|
+
async fetchApi(config, endpoint) {
|
|
41
|
+
const org = config.extra?.org || "default";
|
|
42
|
+
const base = config.baseUrl || `https://dev.azure.com/${org}`;
|
|
43
|
+
const resp = await fetch(`${base}${endpoint}`, {
|
|
44
|
+
headers: {
|
|
45
|
+
Authorization: `Basic ${Buffer.from(`:${config.apiToken}`).toString("base64")}`,
|
|
46
|
+
"Content-Type": "application/json",
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
if (!resp.ok)
|
|
50
|
+
throw new Error(`Azure Repos API ${resp.status}: ${resp.statusText}`);
|
|
51
|
+
return (await resp.json());
|
|
52
|
+
}
|
|
53
|
+
async testConnection(config) {
|
|
54
|
+
try {
|
|
55
|
+
await this.fetchApi(config, "/_apis/projects?api-version=7.0");
|
|
56
|
+
return true;
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
return false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
async collectEvidence(config) {
|
|
63
|
+
const artifacts = [];
|
|
64
|
+
const now = new Date().toISOString();
|
|
65
|
+
const project = config.extra?.project || "default";
|
|
66
|
+
const repos = await this.fetchApi(config, `/${project}/_apis/git/repositories?api-version=7.0`).catch(() => ({ value: [] }));
|
|
67
|
+
artifacts.push({
|
|
68
|
+
id: generateEvidenceId(),
|
|
69
|
+
connectorId: this.id,
|
|
70
|
+
capabilityId: "azure-repos-policies",
|
|
71
|
+
timestamp: now,
|
|
72
|
+
hash: hashEvidence(repos),
|
|
73
|
+
framework: "SOC2",
|
|
74
|
+
controlId: "CC6.1",
|
|
75
|
+
source: `dev.azure.com/${project}/repositories`,
|
|
76
|
+
status: repos.value?.length > 0 ? "compliant" : "unknown",
|
|
77
|
+
data: { repositoryCount: repos.value?.length || 0 },
|
|
78
|
+
metadata: { project },
|
|
79
|
+
});
|
|
80
|
+
const builds = await this.fetchApi(config, `/${project}/_apis/build/builds?top=10&api-version=7.0`).catch(() => ({ value: [] }));
|
|
81
|
+
artifacts.push({
|
|
82
|
+
id: generateEvidenceId(),
|
|
83
|
+
connectorId: this.id,
|
|
84
|
+
capabilityId: "azure-repos-builds",
|
|
85
|
+
timestamp: now,
|
|
86
|
+
hash: hashEvidence(builds),
|
|
87
|
+
framework: "SOC2",
|
|
88
|
+
controlId: "CC8.1",
|
|
89
|
+
source: `dev.azure.com/${project}/builds`,
|
|
90
|
+
status: "partial",
|
|
91
|
+
data: { recentBuilds: builds.value?.length || 0 },
|
|
92
|
+
metadata: { project },
|
|
93
|
+
});
|
|
94
|
+
return artifacts;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class AzureSentinelConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "azure-sentinel";
|
|
4
|
+
readonly name = "Microsoft Sentinel";
|
|
5
|
+
readonly category: "siem";
|
|
6
|
+
readonly authType: "oauth2";
|
|
7
|
+
readonly capabilities: IntegrationCapability[];
|
|
8
|
+
readonly frameworks: ComplianceFramework[];
|
|
9
|
+
private getAccessToken;
|
|
10
|
+
testConnection(config: ConnectorConfig): Promise<boolean>;
|
|
11
|
+
collectEvidence(config: ConnectorConfig): Promise<EvidenceArtifact[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "sentinel-incidents",
|
|
5
|
+
name: "Sentinel Incidents",
|
|
6
|
+
description: "Fetch Microsoft Sentinel security incidents",
|
|
7
|
+
evidenceCategories: ["incident_management", "siem"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "sentinel-alerts",
|
|
11
|
+
name: "Sentinel Alerts",
|
|
12
|
+
description: "Fetch Sentinel alert rules and recent alerts",
|
|
13
|
+
evidenceCategories: ["monitoring", "detection"],
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
export class AzureSentinelConnector {
|
|
17
|
+
id = "azure-sentinel";
|
|
18
|
+
name = "Microsoft Sentinel";
|
|
19
|
+
category = "siem";
|
|
20
|
+
authType = "oauth2";
|
|
21
|
+
capabilities = capabilities;
|
|
22
|
+
frameworks = ["SOC2", "ISO27001", "NIST_CSF"];
|
|
23
|
+
async getAccessToken(config) {
|
|
24
|
+
const resp = await fetch(`https://login.microsoftonline.com/${config.tenantId}/oauth2/v2.0/token`, {
|
|
25
|
+
method: "POST",
|
|
26
|
+
headers: { "Content-Type": "application/x-www-form-urlencoded" },
|
|
27
|
+
body: new URLSearchParams({
|
|
28
|
+
grant_type: "client_credentials",
|
|
29
|
+
client_id: config.clientId || "",
|
|
30
|
+
client_secret: config.clientSecret || "",
|
|
31
|
+
scope: "https://management.azure.com/.default",
|
|
32
|
+
}),
|
|
33
|
+
});
|
|
34
|
+
if (!resp.ok)
|
|
35
|
+
throw new Error(`Azure token ${resp.status}`);
|
|
36
|
+
const data = (await resp.json());
|
|
37
|
+
return data.access_token;
|
|
38
|
+
}
|
|
39
|
+
async testConnection(config) {
|
|
40
|
+
try {
|
|
41
|
+
const token = await this.getAccessToken(config);
|
|
42
|
+
const workspace = config.extra?.workspace || "default";
|
|
43
|
+
const resp = await fetch(`https://management.azure.com/subscriptions/${config.accountId}/resourceGroups/${config.extra?.resourceGroup || "default"}/providers/Microsoft.OperationalInsights/workspaces/${workspace}?api-version=2023-09-01`, { headers: { Authorization: `Bearer ${token}` } });
|
|
44
|
+
return resp.ok;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async collectEvidence(config) {
|
|
51
|
+
const artifacts = [];
|
|
52
|
+
const now = new Date().toISOString();
|
|
53
|
+
const token = await this.getAccessToken(config);
|
|
54
|
+
const headers = { Authorization: `Bearer ${token}` };
|
|
55
|
+
const workspace = config.extra?.workspace || "default";
|
|
56
|
+
const rg = config.extra?.resourceGroup || "default";
|
|
57
|
+
const base = `https://management.azure.com/subscriptions/${config.accountId}/resourceGroups/${rg}/providers/Microsoft.OperationalInsights/workspaces/${workspace}`;
|
|
58
|
+
const incidents = await fetch(`${base}/providers/Microsoft.SecurityInsights/incidents?api-version=2024-01-01&$top=100`, { headers }).then((r) => r.json());
|
|
59
|
+
artifacts.push({
|
|
60
|
+
id: generateEvidenceId(),
|
|
61
|
+
connectorId: this.id,
|
|
62
|
+
capabilityId: "sentinel-incidents",
|
|
63
|
+
timestamp: now,
|
|
64
|
+
hash: hashEvidence(incidents),
|
|
65
|
+
framework: "SOC2",
|
|
66
|
+
controlId: "CC7.3",
|
|
67
|
+
source: "azure-sentinel/incidents",
|
|
68
|
+
status: "unknown",
|
|
69
|
+
data: { incidentCount: (incidents.value || []).length, incidents: incidents.value },
|
|
70
|
+
metadata: { workspace },
|
|
71
|
+
});
|
|
72
|
+
const alerts = await fetch(`${base}/providers/Microsoft.SecurityInsights/alertRules?api-version=2024-01-01`, { headers }).then((r) => r.json());
|
|
73
|
+
artifacts.push({
|
|
74
|
+
id: generateEvidenceId(),
|
|
75
|
+
connectorId: this.id,
|
|
76
|
+
capabilityId: "sentinel-alerts",
|
|
77
|
+
timestamp: now,
|
|
78
|
+
hash: hashEvidence(alerts),
|
|
79
|
+
framework: "SOC2",
|
|
80
|
+
controlId: "CC7.2",
|
|
81
|
+
source: "azure-sentinel/alertRules",
|
|
82
|
+
status: (alerts.value || []).length > 0 ? "compliant" : "non_compliant",
|
|
83
|
+
data: { alertRuleCount: (alerts.value || []).length },
|
|
84
|
+
metadata: { workspace },
|
|
85
|
+
});
|
|
86
|
+
return artifacts;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class BambooCICDConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "bamboo-cicd";
|
|
4
|
+
readonly name = "Atlassian Bamboo";
|
|
5
|
+
readonly category: "ci_cd";
|
|
6
|
+
readonly authType: "basic_auth";
|
|
7
|
+
readonly capabilities: IntegrationCapability[];
|
|
8
|
+
readonly frameworks: ComplianceFramework[];
|
|
9
|
+
private fetchApi;
|
|
10
|
+
testConnection(config: ConnectorConfig): Promise<boolean>;
|
|
11
|
+
collectEvidence(config: ConnectorConfig): Promise<EvidenceArtifact[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "bamboo-plans",
|
|
5
|
+
name: "Build Plans",
|
|
6
|
+
description: "Fetch Bamboo build plan configurations and execution history",
|
|
7
|
+
evidenceCategories: ["ci_cd", "change_management"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "bamboo-deployments",
|
|
11
|
+
name: "Deployment Projects",
|
|
12
|
+
description: "Fetch Bamboo deployment project configurations and release history",
|
|
13
|
+
evidenceCategories: ["ci_cd", "change_management"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "bamboo-permissions",
|
|
17
|
+
name: "Plan Permissions",
|
|
18
|
+
description: "Fetch Bamboo build plan access controls and agent authorizations",
|
|
19
|
+
evidenceCategories: ["access_control", "configuration"],
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
export class BambooCICDConnector {
|
|
23
|
+
id = "bamboo-cicd";
|
|
24
|
+
name = "Atlassian Bamboo";
|
|
25
|
+
category = "ci_cd";
|
|
26
|
+
authType = "basic_auth";
|
|
27
|
+
capabilities = capabilities;
|
|
28
|
+
frameworks = ["SOC2", "ISO27001", "NIST_CSF"];
|
|
29
|
+
async fetchApi(config, endpoint) {
|
|
30
|
+
const base = config.baseUrl || "https://bamboo.example.com/rest/api/latest";
|
|
31
|
+
const auth = Buffer.from(`${config.clientId}:${config.clientSecret}`).toString("base64");
|
|
32
|
+
const resp = await fetch(`${base}${endpoint}`, {
|
|
33
|
+
headers: {
|
|
34
|
+
Authorization: `Basic ${auth}`,
|
|
35
|
+
"Content-Type": "application/json",
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
if (!resp.ok)
|
|
39
|
+
throw new Error(`Bamboo API ${resp.status}: ${resp.statusText}`);
|
|
40
|
+
return (await resp.json());
|
|
41
|
+
}
|
|
42
|
+
async testConnection(config) {
|
|
43
|
+
try {
|
|
44
|
+
await this.fetchApi(config, "/plan.json?maxResults=1");
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async collectEvidence(config) {
|
|
52
|
+
const artifacts = [];
|
|
53
|
+
const now = new Date().toISOString();
|
|
54
|
+
const plans = await this.fetchApi(config, "/plan.json?maxResults=100").catch(() => ({ plans: { plan: [] } }));
|
|
55
|
+
const planData = plans.plans;
|
|
56
|
+
const planList = (planData?.plan || []);
|
|
57
|
+
artifacts.push({
|
|
58
|
+
id: generateEvidenceId(),
|
|
59
|
+
connectorId: this.id,
|
|
60
|
+
capabilityId: "bamboo-plans",
|
|
61
|
+
timestamp: now,
|
|
62
|
+
hash: hashEvidence({ planCount: planList.length }),
|
|
63
|
+
framework: "SOC2",
|
|
64
|
+
controlId: "CC8.1",
|
|
65
|
+
source: "bamboo/plans",
|
|
66
|
+
status: "unknown",
|
|
67
|
+
data: { planCount: planList.length },
|
|
68
|
+
metadata: {},
|
|
69
|
+
});
|
|
70
|
+
return artifacts;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class BambooHRConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "bamboohr";
|
|
4
|
+
readonly name = "BambooHR";
|
|
5
|
+
readonly category: "hr";
|
|
6
|
+
readonly authType: "api_key";
|
|
7
|
+
readonly capabilities: IntegrationCapability[];
|
|
8
|
+
readonly frameworks: ComplianceFramework[];
|
|
9
|
+
private fetchApi;
|
|
10
|
+
testConnection(config: ConnectorConfig): Promise<boolean>;
|
|
11
|
+
collectEvidence(config: ConnectorConfig): Promise<EvidenceArtifact[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "bhr-onboarding",
|
|
5
|
+
name: "Employee Onboarding",
|
|
6
|
+
description: "Fetch recent employee onboarding records and access provisioning",
|
|
7
|
+
evidenceCategories: ["hr", "access_provisioning"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "bhr-offboarding",
|
|
11
|
+
name: "Employee Offboarding",
|
|
12
|
+
description: "Fetch employee offboarding records and access revocations",
|
|
13
|
+
evidenceCategories: ["hr", "access_revocation"],
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
export class BambooHRConnector {
|
|
17
|
+
id = "bamboohr";
|
|
18
|
+
name = "BambooHR";
|
|
19
|
+
category = "hr";
|
|
20
|
+
authType = "api_key";
|
|
21
|
+
capabilities = capabilities;
|
|
22
|
+
frameworks = ["SOC2", "ISO27001"];
|
|
23
|
+
async fetchApi(config, endpoint) {
|
|
24
|
+
const domain = config.extra?.domain || "yourcompany";
|
|
25
|
+
const base = config.baseUrl || `https://api.bamboohr.com/api/gate.php/${domain}`;
|
|
26
|
+
const resp = await fetch(`${base}${endpoint}`, {
|
|
27
|
+
headers: {
|
|
28
|
+
Authorization: `Basic ${Buffer.from(`${config.apiToken}:x`).toString("base64")}`,
|
|
29
|
+
Accept: "application/json",
|
|
30
|
+
},
|
|
31
|
+
});
|
|
32
|
+
if (!resp.ok)
|
|
33
|
+
throw new Error(`BambooHR API ${resp.status}: ${resp.statusText}`);
|
|
34
|
+
return (await resp.json());
|
|
35
|
+
}
|
|
36
|
+
async testConnection(config) {
|
|
37
|
+
try {
|
|
38
|
+
await this.fetchApi(config, "/v1/meta/fields");
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
async collectEvidence(config) {
|
|
46
|
+
const artifacts = [];
|
|
47
|
+
const now = new Date().toISOString();
|
|
48
|
+
const thirtyDaysAgo = new Date(Date.now() - 30 * 24 * 60 * 60 * 1000)
|
|
49
|
+
.toISOString()
|
|
50
|
+
.split("T")[0];
|
|
51
|
+
const employees = await this.fetchApi(config, `/v1/employees/directory?fields=id,employmentEndDate,employmentStatus,hireDate`).catch(() => ({ employees: [] }));
|
|
52
|
+
const empList = (employees.employees || []);
|
|
53
|
+
const terminated = empList.filter((e) => e.employmentStatus === "Terminated" &&
|
|
54
|
+
e.employmentEndDate >= thirtyDaysAgo);
|
|
55
|
+
artifacts.push({
|
|
56
|
+
id: generateEvidenceId(),
|
|
57
|
+
connectorId: this.id,
|
|
58
|
+
capabilityId: "bhr-offboarding",
|
|
59
|
+
timestamp: now,
|
|
60
|
+
hash: hashEvidence({ totalEmployees: empList.length, recentTerminations: terminated.length }),
|
|
61
|
+
framework: "SOC2",
|
|
62
|
+
controlId: "CC6.2",
|
|
63
|
+
source: "bamboohr/directory",
|
|
64
|
+
status: "unknown",
|
|
65
|
+
data: { totalEmployees: empList.length, recentTerminations: terminated.length },
|
|
66
|
+
metadata: { domain: config.extra?.domain || "" },
|
|
67
|
+
});
|
|
68
|
+
const newHires = empList.filter((e) => e.hireDate >= thirtyDaysAgo);
|
|
69
|
+
artifacts.push({
|
|
70
|
+
id: generateEvidenceId(),
|
|
71
|
+
connectorId: this.id,
|
|
72
|
+
capabilityId: "bhr-onboarding",
|
|
73
|
+
timestamp: now,
|
|
74
|
+
hash: hashEvidence({ newHires: newHires.length }),
|
|
75
|
+
framework: "SOC2",
|
|
76
|
+
controlId: "CC6.1",
|
|
77
|
+
source: "bamboohr/directory",
|
|
78
|
+
status: "unknown",
|
|
79
|
+
data: { newHiresLast30Days: newHires.length },
|
|
80
|
+
metadata: { domain: config.extra?.domain || "" },
|
|
81
|
+
});
|
|
82
|
+
return artifacts;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class BeyondTrustConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "beyondtrust";
|
|
4
|
+
readonly name = "BeyondTrust";
|
|
5
|
+
readonly category: "identity";
|
|
6
|
+
readonly authType: "api_key";
|
|
7
|
+
readonly capabilities: IntegrationCapability[];
|
|
8
|
+
readonly frameworks: ComplianceFramework[];
|
|
9
|
+
private fetchApi;
|
|
10
|
+
testConnection(config: ConnectorConfig): Promise<boolean>;
|
|
11
|
+
collectEvidence(config: ConnectorConfig): Promise<EvidenceArtifact[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "beyondtrust-privilege",
|
|
5
|
+
name: "Privilege Management",
|
|
6
|
+
description: "Fetch privileged account policies and session recordings",
|
|
7
|
+
evidenceCategories: ["access_control", "monitoring"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "beyondtrust-endpoint",
|
|
11
|
+
name: "Endpoint Security",
|
|
12
|
+
description: "Fetch endpoint privilege delegation and application control",
|
|
13
|
+
evidenceCategories: ["endpoint", "access_control"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "beyondtrust-password",
|
|
17
|
+
name: "Password Safe",
|
|
18
|
+
description: "Fetch password vault configurations and checkout policies",
|
|
19
|
+
evidenceCategories: ["data_protection", "access_control"],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "beyondtrust-audit",
|
|
23
|
+
name: "Audit Reports",
|
|
24
|
+
description: "Fetch privileged access audit trails and compliance reports",
|
|
25
|
+
evidenceCategories: ["monitoring", "compliance"],
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
export class BeyondTrustConnector {
|
|
29
|
+
id = "beyondtrust";
|
|
30
|
+
name = "BeyondTrust";
|
|
31
|
+
category = "identity";
|
|
32
|
+
authType = "api_key";
|
|
33
|
+
capabilities = capabilities;
|
|
34
|
+
frameworks = [
|
|
35
|
+
"SOC2",
|
|
36
|
+
"ISO27001",
|
|
37
|
+
"NIST_CSF",
|
|
38
|
+
"PCI_DSS",
|
|
39
|
+
];
|
|
40
|
+
async fetchApi(config, endpoint) {
|
|
41
|
+
const base = config.baseUrl || "https://beyondtrust.example.com";
|
|
42
|
+
const resp = await fetch(`${base}/api${endpoint}`, {
|
|
43
|
+
headers: {
|
|
44
|
+
Authorization: `Bearer ${config.apiToken}`,
|
|
45
|
+
"Content-Type": "application/json",
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
if (!resp.ok)
|
|
49
|
+
throw new Error(`BeyondTrust API ${resp.status}: ${resp.statusText}`);
|
|
50
|
+
return (await resp.json());
|
|
51
|
+
}
|
|
52
|
+
async testConnection(config) {
|
|
53
|
+
try {
|
|
54
|
+
await this.fetchApi(config, "/configuration/system");
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async collectEvidence(config) {
|
|
62
|
+
const artifacts = [];
|
|
63
|
+
const now = new Date().toISOString();
|
|
64
|
+
const systems = await this.fetchApi(config, "/managed-systems").catch(() => ({ items: [] }));
|
|
65
|
+
artifacts.push({
|
|
66
|
+
id: generateEvidenceId(),
|
|
67
|
+
connectorId: this.id,
|
|
68
|
+
capabilityId: "beyondtrust-privilege",
|
|
69
|
+
timestamp: now,
|
|
70
|
+
hash: hashEvidence(systems),
|
|
71
|
+
framework: "SOC2",
|
|
72
|
+
controlId: "CC6.1",
|
|
73
|
+
source: "beyondtrust/managed-systems",
|
|
74
|
+
status: systems.items?.length > 0 ? "compliant" : "unknown",
|
|
75
|
+
data: { managedSystems: systems.items?.length || 0 },
|
|
76
|
+
metadata: {},
|
|
77
|
+
});
|
|
78
|
+
const accounts = await this.fetchApi(config, "/accounts").catch(() => ({ items: [] }));
|
|
79
|
+
artifacts.push({
|
|
80
|
+
id: generateEvidenceId(),
|
|
81
|
+
connectorId: this.id,
|
|
82
|
+
capabilityId: "beyondtrust-password",
|
|
83
|
+
timestamp: now,
|
|
84
|
+
hash: hashEvidence(accounts),
|
|
85
|
+
framework: "ISO27001",
|
|
86
|
+
controlId: "A.9.2.6",
|
|
87
|
+
source: "beyondtrust/accounts",
|
|
88
|
+
status: accounts.items?.length > 0 ? "compliant" : "non_compliant",
|
|
89
|
+
data: { privilegedAccounts: accounts.items?.length || 0 },
|
|
90
|
+
metadata: {},
|
|
91
|
+
});
|
|
92
|
+
return artifacts;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class BitbucketConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "bitbucket";
|
|
4
|
+
readonly name = "Bitbucket";
|
|
5
|
+
readonly category: "version_control";
|
|
6
|
+
readonly authType: "api_key";
|
|
7
|
+
readonly capabilities: IntegrationCapability[];
|
|
8
|
+
readonly frameworks: ComplianceFramework[];
|
|
9
|
+
private fetchApi;
|
|
10
|
+
testConnection(config: ConnectorConfig): Promise<boolean>;
|
|
11
|
+
collectEvidence(config: ConnectorConfig): Promise<EvidenceArtifact[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "bitbucket-repos",
|
|
5
|
+
name: "Repository Settings",
|
|
6
|
+
description: "Fetch repo access controls and branch permissions",
|
|
7
|
+
evidenceCategories: ["access_control", "configuration"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "bitbucket-pipelines",
|
|
11
|
+
name: "Pipelines",
|
|
12
|
+
description: "Fetch CI/CD pipeline configurations and run history",
|
|
13
|
+
evidenceCategories: ["change_management", "configuration"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "bitbucket-code-insight",
|
|
17
|
+
name: "Code Insights",
|
|
18
|
+
description: "Fetch code quality and security scan results",
|
|
19
|
+
evidenceCategories: ["vulnerability_management", "change_management"],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "bitbucket-ip-allow",
|
|
23
|
+
name: "IP Allowlisting",
|
|
24
|
+
description: "Fetch IP allowlist configurations for workspace",
|
|
25
|
+
evidenceCategories: ["access_control", "configuration"],
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
export class BitbucketConnector {
|
|
29
|
+
id = "bitbucket";
|
|
30
|
+
name = "Bitbucket";
|
|
31
|
+
category = "version_control";
|
|
32
|
+
authType = "api_key";
|
|
33
|
+
capabilities = capabilities;
|
|
34
|
+
frameworks = [
|
|
35
|
+
"SOC2",
|
|
36
|
+
"ISO27001",
|
|
37
|
+
"NIST_CSF",
|
|
38
|
+
"PCI_DSS",
|
|
39
|
+
];
|
|
40
|
+
async fetchApi(config, endpoint) {
|
|
41
|
+
const base = config.baseUrl || "https://api.bitbucket.org/2.0";
|
|
42
|
+
const resp = await fetch(`${base}${endpoint}`, {
|
|
43
|
+
headers: {
|
|
44
|
+
Authorization: `Bearer ${config.apiToken}`,
|
|
45
|
+
"Content-Type": "application/json",
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
if (!resp.ok)
|
|
49
|
+
throw new Error(`Bitbucket API ${resp.status}: ${resp.statusText}`);
|
|
50
|
+
return (await resp.json());
|
|
51
|
+
}
|
|
52
|
+
async testConnection(config) {
|
|
53
|
+
try {
|
|
54
|
+
await this.fetchApi(config, "/user");
|
|
55
|
+
return true;
|
|
56
|
+
}
|
|
57
|
+
catch {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async collectEvidence(config) {
|
|
62
|
+
const artifacts = [];
|
|
63
|
+
const now = new Date().toISOString();
|
|
64
|
+
const workspace = config.extra?.workspace || "default";
|
|
65
|
+
const repoSlug = config.extra?.repo || "main-repo";
|
|
66
|
+
const repo = await this.fetchApi(config, `/repositories/${workspace}/${repoSlug}`).catch(() => ({}));
|
|
67
|
+
artifacts.push({
|
|
68
|
+
id: generateEvidenceId(),
|
|
69
|
+
connectorId: this.id,
|
|
70
|
+
capabilityId: "bitbucket-repos",
|
|
71
|
+
timestamp: now,
|
|
72
|
+
hash: hashEvidence(repo),
|
|
73
|
+
framework: "SOC2",
|
|
74
|
+
controlId: "CC6.1",
|
|
75
|
+
source: `bitbucket.org/${workspace}/${repoSlug}`,
|
|
76
|
+
status: repo.is_private === true ? "compliant" : "partial",
|
|
77
|
+
data: {
|
|
78
|
+
isPrivate: repo.is_private,
|
|
79
|
+
defaultBranch: repo.default_branch,
|
|
80
|
+
hasIssues: repo.has_issues,
|
|
81
|
+
},
|
|
82
|
+
metadata: { workspace, repoSlug },
|
|
83
|
+
});
|
|
84
|
+
const pipelines = await this.fetchApi(config, `/repositories/${workspace}/${repoSlug}/pipelines/?max_length=10`).catch(() => ({ values: [] }));
|
|
85
|
+
artifacts.push({
|
|
86
|
+
id: generateEvidenceId(),
|
|
87
|
+
connectorId: this.id,
|
|
88
|
+
capabilityId: "bitbucket-pipelines",
|
|
89
|
+
timestamp: now,
|
|
90
|
+
hash: hashEvidence(pipelines),
|
|
91
|
+
framework: "SOC2",
|
|
92
|
+
controlId: "CC8.1",
|
|
93
|
+
source: `bitbucket.org/${workspace}/${repoSlug}/pipelines`,
|
|
94
|
+
status: "partial",
|
|
95
|
+
data: { recentPipelines: pipelines.values?.length || 0 },
|
|
96
|
+
metadata: { workspace, repoSlug },
|
|
97
|
+
});
|
|
98
|
+
return artifacts;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class BitbucketPipelinesConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "bitbucket-pipelines";
|
|
4
|
+
readonly name = "Bitbucket Pipelines";
|
|
5
|
+
readonly category: "ci_cd";
|
|
6
|
+
readonly authType: "bearer_token";
|
|
7
|
+
readonly capabilities: IntegrationCapability[];
|
|
8
|
+
readonly frameworks: ComplianceFramework[];
|
|
9
|
+
private fetchApi;
|
|
10
|
+
testConnection(config: ConnectorConfig): Promise<boolean>;
|
|
11
|
+
collectEvidence(config: ConnectorConfig): Promise<EvidenceArtifact[]>;
|
|
12
|
+
}
|