@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,91 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "sf-user-permissions",
|
|
5
|
+
name: "User Permissions",
|
|
6
|
+
description: "Fetch Salesforce user permission sets and profiles",
|
|
7
|
+
evidenceCategories: ["access_control", "authorization"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "sf-field-security",
|
|
11
|
+
name: "Field-Level Security",
|
|
12
|
+
description: "Fetch field-level security configurations on sensitive objects",
|
|
13
|
+
evidenceCategories: ["data_protection", "access_control"],
|
|
14
|
+
},
|
|
15
|
+
];
|
|
16
|
+
export class SalesforceConnector {
|
|
17
|
+
id = "salesforce";
|
|
18
|
+
name = "Salesforce";
|
|
19
|
+
category = "hr";
|
|
20
|
+
authType = "oauth2";
|
|
21
|
+
capabilities = capabilities;
|
|
22
|
+
frameworks = ["SOC2", "ISO27001", "HIPAA"];
|
|
23
|
+
async getAccessToken(config) {
|
|
24
|
+
const resp = await fetch(`${config.baseUrl || "https://login.salesforce.com"}/services/oauth2/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
|
+
}),
|
|
32
|
+
});
|
|
33
|
+
if (!resp.ok)
|
|
34
|
+
throw new Error(`Salesforce token ${resp.status}`);
|
|
35
|
+
const data = (await resp.json());
|
|
36
|
+
return data.access_token;
|
|
37
|
+
}
|
|
38
|
+
async testConnection(config) {
|
|
39
|
+
try {
|
|
40
|
+
const token = await this.getAccessToken(config);
|
|
41
|
+
const instanceUrl = config.extra?.instanceUrl || "https://your-instance.salesforce.com";
|
|
42
|
+
const resp = await fetch(`${instanceUrl}/services/data/v59.0/limits`, {
|
|
43
|
+
headers: { Authorization: `Bearer ${token}` },
|
|
44
|
+
});
|
|
45
|
+
return resp.ok;
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
async collectEvidence(config) {
|
|
52
|
+
const artifacts = [];
|
|
53
|
+
const now = new Date().toISOString();
|
|
54
|
+
const token = await this.getAccessToken(config);
|
|
55
|
+
const instanceUrl = config.extra?.instanceUrl || "https://your-instance.salesforce.com";
|
|
56
|
+
const headers = { Authorization: `Bearer ${token}` };
|
|
57
|
+
const users = await fetch(`${instanceUrl}/services/data/v59.0/query?q=SELECT+Id,Username,ProfileId,IsActive+FROM+User+WHERE+IsActive=TRUE+LIMIT+200`, { headers }).then((r) => r.json());
|
|
58
|
+
const userList = (users.records || []);
|
|
59
|
+
artifacts.push({
|
|
60
|
+
id: generateEvidenceId(),
|
|
61
|
+
connectorId: this.id,
|
|
62
|
+
capabilityId: "sf-user-permissions",
|
|
63
|
+
timestamp: now,
|
|
64
|
+
hash: hashEvidence({ userCount: userList.length }),
|
|
65
|
+
framework: "SOC2",
|
|
66
|
+
controlId: "CC6.1",
|
|
67
|
+
source: "salesforce/users",
|
|
68
|
+
status: "unknown",
|
|
69
|
+
data: { activeUserCount: userList.length },
|
|
70
|
+
metadata: { instanceUrl },
|
|
71
|
+
});
|
|
72
|
+
const fieldPerms = await fetch(`${instanceUrl}/services/data/v59.0/query?q=SELECT+ParentId,Field,Editable+FROM+FieldPermission+WHERE+Parent.Profile.Name='Standard+User'+LIMIT+100`, { headers }).then((r) => r.json());
|
|
73
|
+
const permRecords = (fieldPerms.records || []);
|
|
74
|
+
const editableSensitive = permRecords.filter((p) => p.Editable === true &&
|
|
75
|
+
(p.Field || "").includes("Email"));
|
|
76
|
+
artifacts.push({
|
|
77
|
+
id: generateEvidenceId(),
|
|
78
|
+
connectorId: this.id,
|
|
79
|
+
capabilityId: "sf-field-security",
|
|
80
|
+
timestamp: now,
|
|
81
|
+
hash: hashEvidence({ permissionCount: permRecords.length }),
|
|
82
|
+
framework: "ISO27001",
|
|
83
|
+
controlId: "A.9.4.1",
|
|
84
|
+
source: "salesforce/fieldPermissions",
|
|
85
|
+
status: editableSensitive.length === 0 ? "compliant" : "partial",
|
|
86
|
+
data: { fieldPermissionCount: permRecords.length, editableSensitiveFields: editableSensitive.length },
|
|
87
|
+
metadata: { instanceUrl },
|
|
88
|
+
});
|
|
89
|
+
return artifacts;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class SendGridConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "sendgrid";
|
|
4
|
+
readonly name = "SendGrid";
|
|
5
|
+
readonly category: "communication";
|
|
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,69 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "sendgrid-stats",
|
|
5
|
+
name: "Email Statistics",
|
|
6
|
+
description: "Fetch SendGrid email delivery statistics, bounce rates, and spam reports",
|
|
7
|
+
evidenceCategories: ["monitoring", "configuration"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "sendgrid-security",
|
|
11
|
+
name: "Security Settings",
|
|
12
|
+
description: "Fetch SendGrid API key permissions, IP whitelisting, and authentication settings",
|
|
13
|
+
evidenceCategories: ["access_control", "secret_management"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "sendgrid-templates",
|
|
17
|
+
name: "Email Templates",
|
|
18
|
+
description: "Fetch SendGrid email template versions and approval workflows",
|
|
19
|
+
evidenceCategories: ["change_management", "configuration"],
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
export class SendGridConnector {
|
|
23
|
+
id = "sendgrid";
|
|
24
|
+
name = "SendGrid";
|
|
25
|
+
category = "communication";
|
|
26
|
+
authType = "api_key";
|
|
27
|
+
capabilities = capabilities;
|
|
28
|
+
frameworks = ["SOC2", "ISO27001"];
|
|
29
|
+
async fetchApi(config, endpoint) {
|
|
30
|
+
const base = config.baseUrl || "https://api.sendgrid.com/v3";
|
|
31
|
+
const resp = await fetch(`${base}${endpoint}`, {
|
|
32
|
+
headers: {
|
|
33
|
+
Authorization: `Bearer ${config.apiToken}`,
|
|
34
|
+
"Content-Type": "application/json",
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
if (!resp.ok)
|
|
38
|
+
throw new Error(`SendGrid API ${resp.status}: ${resp.statusText}`);
|
|
39
|
+
return (await resp.json());
|
|
40
|
+
}
|
|
41
|
+
async testConnection(config) {
|
|
42
|
+
try {
|
|
43
|
+
await this.fetchApi(config, "/user/profile");
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async collectEvidence(config) {
|
|
51
|
+
const artifacts = [];
|
|
52
|
+
const now = new Date().toISOString();
|
|
53
|
+
const profile = await this.fetchApi(config, "/user/profile").catch(() => ({}));
|
|
54
|
+
artifacts.push({
|
|
55
|
+
id: generateEvidenceId(),
|
|
56
|
+
connectorId: this.id,
|
|
57
|
+
capabilityId: "sendgrid-stats",
|
|
58
|
+
timestamp: now,
|
|
59
|
+
hash: hashEvidence(profile),
|
|
60
|
+
framework: "SOC2",
|
|
61
|
+
controlId: "CC6.1",
|
|
62
|
+
source: "sendgrid/profile",
|
|
63
|
+
status: "unknown",
|
|
64
|
+
data: { connected: true },
|
|
65
|
+
metadata: {},
|
|
66
|
+
});
|
|
67
|
+
return artifacts;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class SentinelOneConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "sentinelone";
|
|
4
|
+
readonly name = "SentinelOne";
|
|
5
|
+
readonly category: "endpoint";
|
|
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,89 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "sentinelone-agents",
|
|
5
|
+
name: "Agent Fleet",
|
|
6
|
+
description: "Fetch SentinelOne agent status and health across endpoints",
|
|
7
|
+
evidenceCategories: ["endpoint", "monitoring"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "sentinelone-detections",
|
|
11
|
+
name: "Threat Detections",
|
|
12
|
+
description: "Fetch threat detection events and incident counts",
|
|
13
|
+
evidenceCategories: ["vulnerability_management", "monitoring"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "sentinelone-policies",
|
|
17
|
+
name: "Deep Visibility",
|
|
18
|
+
description: "Fetch detection policy configurations and exclusions",
|
|
19
|
+
evidenceCategories: ["access_control", "configuration"],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "sentinelone-response",
|
|
23
|
+
name: "Response Actions",
|
|
24
|
+
description: "Fetch remote shell, isolate, and response action logs",
|
|
25
|
+
evidenceCategories: ["monitoring", "change_management"],
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
export class SentinelOneConnector {
|
|
29
|
+
id = "sentinelone";
|
|
30
|
+
name = "SentinelOne";
|
|
31
|
+
category = "endpoint";
|
|
32
|
+
authType = "api_key";
|
|
33
|
+
capabilities = capabilities;
|
|
34
|
+
frameworks = ["SOC2", "ISO27001", "NIST_CSF", "HIPAA", "PCI_DSS"];
|
|
35
|
+
async fetchApi(config, endpoint) {
|
|
36
|
+
const base = config.baseUrl || "https://usea1.sentinelone.com";
|
|
37
|
+
const resp = await fetch(`${base}/web/api/v2.1${endpoint}`, {
|
|
38
|
+
headers: {
|
|
39
|
+
Authorization: `ApiToken ${config.apiToken}`,
|
|
40
|
+
"Content-Type": "application/json",
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
if (!resp.ok)
|
|
44
|
+
throw new Error(`SentinelOne API ${resp.status}: ${resp.statusText}`);
|
|
45
|
+
return (await resp.json());
|
|
46
|
+
}
|
|
47
|
+
async testConnection(config) {
|
|
48
|
+
try {
|
|
49
|
+
await this.fetchApi(config, "/agents");
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async collectEvidence(config) {
|
|
57
|
+
const artifacts = [];
|
|
58
|
+
const now = new Date().toISOString();
|
|
59
|
+
const agents = await this.fetchApi(config, "/agents").catch(() => ({ data: [] }));
|
|
60
|
+
artifacts.push({
|
|
61
|
+
id: generateEvidenceId(),
|
|
62
|
+
connectorId: this.id,
|
|
63
|
+
capabilityId: "sentinelone-agents",
|
|
64
|
+
timestamp: now,
|
|
65
|
+
hash: hashEvidence(agents),
|
|
66
|
+
framework: "SOC2",
|
|
67
|
+
controlId: "CC6.8",
|
|
68
|
+
source: "sentinelone/agents",
|
|
69
|
+
status: agents.data?.length > 0 ? "compliant" : "unknown",
|
|
70
|
+
data: { agentCount: agents.data?.length || 0 },
|
|
71
|
+
metadata: {},
|
|
72
|
+
});
|
|
73
|
+
const threats = await this.fetchApi(config, "/threats?limit=10").catch(() => ({ data: [] }));
|
|
74
|
+
artifacts.push({
|
|
75
|
+
id: generateEvidenceId(),
|
|
76
|
+
connectorId: this.id,
|
|
77
|
+
capabilityId: "sentinelone-detections",
|
|
78
|
+
timestamp: now,
|
|
79
|
+
hash: hashEvidence(threats),
|
|
80
|
+
framework: "ISO27001",
|
|
81
|
+
controlId: "A.12.2.1",
|
|
82
|
+
source: "sentinelone/threats",
|
|
83
|
+
status: threats.data?.length === 0 ? "compliant" : "non_compliant",
|
|
84
|
+
data: { openThreats: threats.data?.length || 0 },
|
|
85
|
+
metadata: {},
|
|
86
|
+
});
|
|
87
|
+
return artifacts;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class ServiceNowConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "servicenow";
|
|
4
|
+
readonly name = "ServiceNow";
|
|
5
|
+
readonly category: "incident_management";
|
|
6
|
+
readonly authType: "oauth2";
|
|
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,123 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "snow-incidents",
|
|
5
|
+
name: "Incident Records",
|
|
6
|
+
description: "Fetch ServiceNow ITSM incident records and resolution metrics",
|
|
7
|
+
evidenceCategories: ["incident_management", "change_management"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "snow-change-requests",
|
|
11
|
+
name: "Change Requests",
|
|
12
|
+
description: "Fetch change request records including approval workflows",
|
|
13
|
+
evidenceCategories: ["change_management"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "snow-problems",
|
|
17
|
+
name: "Problem Records",
|
|
18
|
+
description: "Fetch problem management records and root cause analysis",
|
|
19
|
+
evidenceCategories: ["incident_management", "risk_management"],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
id: "snow-configuration",
|
|
23
|
+
name: "CMDB Configuration",
|
|
24
|
+
description: "Fetch CMDB configuration items and relationships",
|
|
25
|
+
evidenceCategories: ["configuration", "asset_management"],
|
|
26
|
+
},
|
|
27
|
+
];
|
|
28
|
+
export class ServiceNowConnector {
|
|
29
|
+
id = "servicenow";
|
|
30
|
+
name = "ServiceNow";
|
|
31
|
+
category = "incident_management";
|
|
32
|
+
authType = "oauth2";
|
|
33
|
+
capabilities = capabilities;
|
|
34
|
+
frameworks = ["SOC2", "ISO27001", "NIST_CSF", "HIPAA", "PCI_DSS"];
|
|
35
|
+
async fetchApi(config, endpoint) {
|
|
36
|
+
const base = config.baseUrl || `https://${config.extra?.instance || "instance"}.service-now.com/api/now`;
|
|
37
|
+
const resp = await fetch(`${base}${endpoint}`, {
|
|
38
|
+
headers: {
|
|
39
|
+
Accept: "application/json",
|
|
40
|
+
Authorization: `Bearer ${config.apiToken}`,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
if (!resp.ok)
|
|
44
|
+
throw new Error(`ServiceNow API ${resp.status}: ${resp.statusText}`);
|
|
45
|
+
return (await resp.json());
|
|
46
|
+
}
|
|
47
|
+
async testConnection(config) {
|
|
48
|
+
try {
|
|
49
|
+
await this.fetchApi(config, "/table/sys_user?sysparm_limit=1");
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
catch {
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
async collectEvidence(config) {
|
|
57
|
+
const artifacts = [];
|
|
58
|
+
const now = new Date().toISOString();
|
|
59
|
+
const incidents = await this.fetchApi(config, "/table/incident?sysparm_limit=100&sysparm_fields=number,state,severity,assigned_to,opened_at,resolved_at").catch(() => ({ result: [] }));
|
|
60
|
+
const incidentList = (incidents.result || []);
|
|
61
|
+
const resolved = incidentList.filter((i) => i.state === "6" || i.state === "7");
|
|
62
|
+
artifacts.push({
|
|
63
|
+
id: generateEvidenceId(),
|
|
64
|
+
connectorId: this.id,
|
|
65
|
+
capabilityId: "snow-incidents",
|
|
66
|
+
timestamp: now,
|
|
67
|
+
hash: hashEvidence({ total: incidentList.length, resolved: resolved.length }),
|
|
68
|
+
framework: "SOC2",
|
|
69
|
+
controlId: "CC7.3",
|
|
70
|
+
source: "servicenow/incident",
|
|
71
|
+
status: "unknown",
|
|
72
|
+
data: { incidentCount: incidentList.length, resolvedCount: resolved.length },
|
|
73
|
+
metadata: { instance: config.extra?.instance || "" },
|
|
74
|
+
});
|
|
75
|
+
const changes = await this.fetchApi(config, "/table/change_request?sysparm_limit=100&sysparm_fields=number,state,risk,approval").catch(() => ({ result: [] }));
|
|
76
|
+
const changeList = (changes.result || []);
|
|
77
|
+
const approved = changeList.filter((c) => c.approval === "approved");
|
|
78
|
+
artifacts.push({
|
|
79
|
+
id: generateEvidenceId(),
|
|
80
|
+
connectorId: this.id,
|
|
81
|
+
capabilityId: "snow-change-requests",
|
|
82
|
+
timestamp: now,
|
|
83
|
+
hash: hashEvidence({ total: changeList.length, approved: approved.length }),
|
|
84
|
+
framework: "ISO27001",
|
|
85
|
+
controlId: "A.12.1.4",
|
|
86
|
+
source: "servicenow/change_request",
|
|
87
|
+
status: "unknown",
|
|
88
|
+
data: { changeCount: changeList.length, approvedCount: approved.length },
|
|
89
|
+
metadata: { instance: config.extra?.instance || "" },
|
|
90
|
+
});
|
|
91
|
+
const problems = await this.fetchApi(config, "/table/problem?sysparm_limit=100&sysparm_fields=number,state,priority,known_error").catch(() => ({ result: [] }));
|
|
92
|
+
const problemList = (problems.result || []);
|
|
93
|
+
artifacts.push({
|
|
94
|
+
id: generateEvidenceId(),
|
|
95
|
+
connectorId: this.id,
|
|
96
|
+
capabilityId: "snow-problems",
|
|
97
|
+
timestamp: now,
|
|
98
|
+
hash: hashEvidence({ total: problemList.length }),
|
|
99
|
+
framework: "ISO27001",
|
|
100
|
+
controlId: "A.12.1.4",
|
|
101
|
+
source: "servicenow/problem",
|
|
102
|
+
status: "unknown",
|
|
103
|
+
data: { problemCount: problemList.length },
|
|
104
|
+
metadata: { instance: config.extra?.instance || "" },
|
|
105
|
+
});
|
|
106
|
+
const cmdb = await this.fetchApi(config, "/table/cmdb_ci?sysparm_limit=100&sysparm_fields=name,sys_class_name,operational_status").catch(() => ({ result: [] }));
|
|
107
|
+
const cmdbList = (cmdb.result || []);
|
|
108
|
+
artifacts.push({
|
|
109
|
+
id: generateEvidenceId(),
|
|
110
|
+
connectorId: this.id,
|
|
111
|
+
capabilityId: "snow-configuration",
|
|
112
|
+
timestamp: now,
|
|
113
|
+
hash: hashEvidence({ total: cmdbList.length }),
|
|
114
|
+
framework: "SOC2",
|
|
115
|
+
controlId: "CC6.1",
|
|
116
|
+
source: "servicenow/cmdb_ci",
|
|
117
|
+
status: "unknown",
|
|
118
|
+
data: { ciCount: cmdbList.length },
|
|
119
|
+
metadata: { instance: config.extra?.instance || "" },
|
|
120
|
+
});
|
|
121
|
+
return artifacts;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class SlackConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "slack";
|
|
4
|
+
readonly name = "Slack";
|
|
5
|
+
readonly category: "communication";
|
|
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
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "slack-workspace",
|
|
5
|
+
name: "Workspace Settings",
|
|
6
|
+
description: "Fetch Slack workspace security and compliance settings",
|
|
7
|
+
evidenceCategories: ["configuration", "access_control"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "slack-apps",
|
|
11
|
+
name: "App Installations",
|
|
12
|
+
description: "Fetch installed apps and their permissions",
|
|
13
|
+
evidenceCategories: ["access_control", "third_party_management"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "slack-channels",
|
|
17
|
+
name: "Channel Access",
|
|
18
|
+
description: "Fetch channel privacy and access controls",
|
|
19
|
+
evidenceCategories: ["access_control", "data_protection"],
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
export class SlackConnector {
|
|
23
|
+
id = "slack";
|
|
24
|
+
name = "Slack";
|
|
25
|
+
category = "communication";
|
|
26
|
+
authType = "bearer_token";
|
|
27
|
+
capabilities = capabilities;
|
|
28
|
+
frameworks = ["SOC2", "ISO27001"];
|
|
29
|
+
async fetchApi(config, endpoint) {
|
|
30
|
+
const base = config.baseUrl || "https://slack.com/api";
|
|
31
|
+
const resp = await fetch(`${base}${endpoint}`, {
|
|
32
|
+
headers: { Authorization: `Bearer ${config.apiToken}` },
|
|
33
|
+
});
|
|
34
|
+
if (!resp.ok)
|
|
35
|
+
throw new Error(`Slack API ${resp.status}: ${resp.statusText}`);
|
|
36
|
+
const data = (await resp.json());
|
|
37
|
+
if (data.ok === false)
|
|
38
|
+
throw new Error(`Slack error: ${data.error}`);
|
|
39
|
+
return data;
|
|
40
|
+
}
|
|
41
|
+
async testConnection(config) {
|
|
42
|
+
try {
|
|
43
|
+
await this.fetchApi(config, "/auth.test");
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
async collectEvidence(config) {
|
|
51
|
+
const artifacts = [];
|
|
52
|
+
const now = new Date().toISOString();
|
|
53
|
+
const team = await this.fetchApi(config, "/team.info");
|
|
54
|
+
const teamData = (team.team || {});
|
|
55
|
+
artifacts.push({
|
|
56
|
+
id: generateEvidenceId(),
|
|
57
|
+
connectorId: this.id,
|
|
58
|
+
capabilityId: "slack-workspace",
|
|
59
|
+
timestamp: now,
|
|
60
|
+
hash: hashEvidence(team),
|
|
61
|
+
framework: "SOC2",
|
|
62
|
+
controlId: "CC6.1",
|
|
63
|
+
source: "slack/team.info",
|
|
64
|
+
status: "compliant",
|
|
65
|
+
data: {
|
|
66
|
+
teamId: teamData.id,
|
|
67
|
+
teamName: teamData.name,
|
|
68
|
+
domain: teamData.domain,
|
|
69
|
+
emailDomain: teamData.email_domain,
|
|
70
|
+
},
|
|
71
|
+
metadata: { workspace: String(teamData.domain || "") },
|
|
72
|
+
});
|
|
73
|
+
const apps = await this.fetchApi(config, "/apps.permissions.list").catch(() => ({
|
|
74
|
+
scopes: [],
|
|
75
|
+
}));
|
|
76
|
+
artifacts.push({
|
|
77
|
+
id: generateEvidenceId(),
|
|
78
|
+
connectorId: this.id,
|
|
79
|
+
capabilityId: "slack-apps",
|
|
80
|
+
timestamp: now,
|
|
81
|
+
hash: hashEvidence(apps),
|
|
82
|
+
framework: "ISO27001",
|
|
83
|
+
controlId: "A.14.2.5",
|
|
84
|
+
source: "slack/apps.permissions.list",
|
|
85
|
+
status: "unknown",
|
|
86
|
+
data: { appScopes: apps.scopes },
|
|
87
|
+
metadata: { workspace: String(teamData.domain || "") },
|
|
88
|
+
});
|
|
89
|
+
const channels = await this.fetchApi(config, "/conversations.list?types=public_channel,private_channel&limit=200").catch(() => ({
|
|
90
|
+
channels: [],
|
|
91
|
+
}));
|
|
92
|
+
const channelList = (channels.channels || []);
|
|
93
|
+
const privateChannels = channelList.filter((c) => c.is_private === true);
|
|
94
|
+
artifacts.push({
|
|
95
|
+
id: generateEvidenceId(),
|
|
96
|
+
connectorId: this.id,
|
|
97
|
+
capabilityId: "slack-channels",
|
|
98
|
+
timestamp: now,
|
|
99
|
+
hash: hashEvidence({ total: channelList.length, private: privateChannels.length }),
|
|
100
|
+
framework: "SOC2",
|
|
101
|
+
controlId: "CC6.4",
|
|
102
|
+
source: "slack/conversations.list",
|
|
103
|
+
status: "unknown",
|
|
104
|
+
data: { totalChannels: channelList.length, privateChannels: privateChannels.length },
|
|
105
|
+
metadata: { workspace: String(teamData.domain || "") },
|
|
106
|
+
});
|
|
107
|
+
return artifacts;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class SnowflakeConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "snowflake";
|
|
4
|
+
readonly name = "Snowflake";
|
|
5
|
+
readonly category: "data_warehouse";
|
|
6
|
+
readonly authType: "basic_auth";
|
|
7
|
+
readonly capabilities: IntegrationCapability[];
|
|
8
|
+
readonly frameworks: ComplianceFramework[];
|
|
9
|
+
private querySnowflake;
|
|
10
|
+
testConnection(config: ConnectorConfig): Promise<boolean>;
|
|
11
|
+
collectEvidence(config: ConnectorConfig): Promise<EvidenceArtifact[]>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { hashEvidence, generateEvidenceId } from "../types.js";
|
|
2
|
+
const capabilities = [
|
|
3
|
+
{
|
|
4
|
+
id: "sf-access-policies",
|
|
5
|
+
name: "Access Policies",
|
|
6
|
+
description: "Fetch Snowflake access policies and role hierarchy",
|
|
7
|
+
evidenceCategories: ["access_control"],
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
id: "sf-query-history",
|
|
11
|
+
name: "Query History",
|
|
12
|
+
description: "Fetch query history for data access auditing",
|
|
13
|
+
evidenceCategories: ["audit", "data_access"],
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: "sf-data-access",
|
|
17
|
+
name: "Data Access Logs",
|
|
18
|
+
description: "Fetch COPY history and data loading access logs",
|
|
19
|
+
evidenceCategories: ["data_protection", "logging"],
|
|
20
|
+
},
|
|
21
|
+
];
|
|
22
|
+
export class SnowflakeConnector {
|
|
23
|
+
id = "snowflake";
|
|
24
|
+
name = "Snowflake";
|
|
25
|
+
category = "data_warehouse";
|
|
26
|
+
authType = "basic_auth";
|
|
27
|
+
capabilities = capabilities;
|
|
28
|
+
frameworks = ["SOC2", "ISO27001", "HIPAA"];
|
|
29
|
+
async querySnowflake(config, sql) {
|
|
30
|
+
const account = config.extra?.account || "your-account";
|
|
31
|
+
const resp = await fetch(`https://${account}.snowflakecomputing.com/api/v2/statements`, {
|
|
32
|
+
method: "POST",
|
|
33
|
+
headers: {
|
|
34
|
+
Authorization: `Basic ${Buffer.from(`${config.clientId}:${config.apiToken}`).toString("base64")}`,
|
|
35
|
+
"Content-Type": "application/json",
|
|
36
|
+
"X-Snowflake-Database": config.extra?.database || "MAIN",
|
|
37
|
+
"X-Snowflake-Schema": config.extra?.schema || "PUBLIC",
|
|
38
|
+
"X-Snowflake-Role": config.extra?.role || "ACCOUNTADMIN",
|
|
39
|
+
},
|
|
40
|
+
body: JSON.stringify({ statement: sql, timeout: 30 }),
|
|
41
|
+
});
|
|
42
|
+
if (!resp.ok)
|
|
43
|
+
throw new Error(`Snowflake ${resp.status}: ${resp.statusText}`);
|
|
44
|
+
return (await resp.json());
|
|
45
|
+
}
|
|
46
|
+
async testConnection(config) {
|
|
47
|
+
try {
|
|
48
|
+
await this.querySnowflake(config, "SELECT CURRENT_VERSION()");
|
|
49
|
+
return true;
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
async collectEvidence(config) {
|
|
56
|
+
const artifacts = [];
|
|
57
|
+
const now = new Date().toISOString();
|
|
58
|
+
const policies = await this.querySnowflake(config, "SELECT * FROM information_schema.policy_references WHERE POLICY_KIND = 'ROW_ACCESS_POLICY'").catch(() => ({ result: { rowset: [] } }));
|
|
59
|
+
const policyRowset = (policies.result?.rowset || []);
|
|
60
|
+
artifacts.push({
|
|
61
|
+
id: generateEvidenceId(),
|
|
62
|
+
connectorId: this.id,
|
|
63
|
+
capabilityId: "sf-access-policies",
|
|
64
|
+
timestamp: now,
|
|
65
|
+
hash: hashEvidence({ policyCount: policyRowset.length }),
|
|
66
|
+
framework: "SOC2",
|
|
67
|
+
controlId: "CC6.1",
|
|
68
|
+
source: "snowflake/policy_references",
|
|
69
|
+
status: "unknown",
|
|
70
|
+
data: { policies: policyRowset },
|
|
71
|
+
metadata: { account: config.extra?.account || "" },
|
|
72
|
+
});
|
|
73
|
+
const queries = await this.querySnowflake(config, "SELECT query_text, user_name, start_time FROM table(information_schema.query_history(limit => 100)) ORDER BY start_time DESC").catch(() => ({ result: { rowset: [] } }));
|
|
74
|
+
const queryRowset = (queries.result?.rowset || []);
|
|
75
|
+
artifacts.push({
|
|
76
|
+
id: generateEvidenceId(),
|
|
77
|
+
connectorId: this.id,
|
|
78
|
+
capabilityId: "sf-query-history",
|
|
79
|
+
timestamp: now,
|
|
80
|
+
hash: hashEvidence({ queryCount: queryRowset.length }),
|
|
81
|
+
framework: "SOC2",
|
|
82
|
+
controlId: "CC7.1",
|
|
83
|
+
source: "snowflake/query_history",
|
|
84
|
+
status: "unknown",
|
|
85
|
+
data: { queryCount: queryRowset.length },
|
|
86
|
+
metadata: { account: config.extra?.account || "" },
|
|
87
|
+
});
|
|
88
|
+
const copyHistory = await this.querySnowflake(config, "SELECT * FROM table(information_schema.copy_history(table_name => '%%', start_time => dateadd(day, -7, current_timestamp())))").catch(() => ({ result: { rowset: [] } }));
|
|
89
|
+
const copyRowset = (copyHistory.result?.rowset || []);
|
|
90
|
+
artifacts.push({
|
|
91
|
+
id: generateEvidenceId(),
|
|
92
|
+
connectorId: this.id,
|
|
93
|
+
capabilityId: "sf-data-access",
|
|
94
|
+
timestamp: now,
|
|
95
|
+
hash: hashEvidence({ copyOperations: copyRowset.length }),
|
|
96
|
+
framework: "ISO27001",
|
|
97
|
+
controlId: "A.12.4.1",
|
|
98
|
+
source: "snowflake/copy_history",
|
|
99
|
+
status: "unknown",
|
|
100
|
+
data: { copyOperations: copyRowset.length },
|
|
101
|
+
metadata: { account: config.extra?.account || "" },
|
|
102
|
+
});
|
|
103
|
+
return artifacts;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { IntegrationConnector, ConnectorConfig, EvidenceArtifact, IntegrationCapability, ComplianceFramework } from "../types.js";
|
|
2
|
+
export declare class SnykConnector implements IntegrationConnector {
|
|
3
|
+
readonly id = "snyk";
|
|
4
|
+
readonly name = "Snyk";
|
|
5
|
+
readonly category: "vulnerability";
|
|
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
|
+
}
|