Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
665f454
feat(integrations): add cloud services as evidence integrations (GCP/…
tofikwest Jun 1, 2026
e84d747
Merge branch 'main' into worktree-cloud-posture-task-mappings
tofikwest Jun 1, 2026
5f6bebc
fix(integrations): address cubic review — fix 30 verified cloud-check…
tofikwest Jun 2, 2026
9df1803
Merge remote-tracking branch 'origin/worktree-cloud-posture-task-mapp…
tofikwest Jun 2, 2026
d1c6368
fix(integrations): address cubic 2nd-pass review (10 findings)
tofikwest Jun 2, 2026
220982b
fix(integrations): cubic 3rd-pass — scan continuity, Aurora backups, …
tofikwest Jun 2, 2026
a467ff9
fix(integration-platform): address cubic round-4 review (27 findings)
tofikwest Jun 2, 2026
6ef7ad0
fix(integration-platform): extend round-4 patterns to sibling check f…
tofikwest Jun 2, 2026
0b8a52d
Merge branch 'main' into worktree-cloud-posture-task-mappings
tofikwest Jun 2, 2026
3ec918a
fix(integration-platform): resolve 3 P1s from cubic review of fix com…
tofikwest Jun 2, 2026
46c7ff6
Merge remote-tracking branch 'origin/worktree-cloud-posture-task-mapp…
tofikwest Jun 2, 2026
239aea4
fix(integration-platform): resolve cubic findings on latest commit (4…
tofikwest Jun 2, 2026
96e1f04
Merge branch 'main' into worktree-cloud-posture-task-mappings
tofikwest Jun 2, 2026
67a23d8
Merge branch 'main' into worktree-cloud-posture-task-mappings
tofikwest Jun 2, 2026
b1b5579
fix(integration-platform): resolve 4 cubic findings (RBAC gate + read…
tofikwest Jun 2, 2026
78e987c
Merge remote-tracking branch 'origin/worktree-cloud-posture-task-mapp…
tofikwest Jun 2, 2026
d59e4c7
fix(integration-platform): never let a read failure end as a silent/f…
tofikwest Jun 2, 2026
4a6b64a
fix(integration-platform): address cubic review of d59e4c7ca (2 P2s)
tofikwest Jun 2, 2026
640845d
chore: merge release v3.67.0 back to main [skip ci]
github-actions[bot] Jun 2, 2026
63dab6d
Merge branch 'main' into worktree-cloud-posture-task-mappings
tofikwest Jun 2, 2026
cdde662
fix(integration-platform): close GCP IAM silent pass, harden CloudTra…
tofikwest Jun 2, 2026
05d1cce
fix(integration-platform): include out-of-scope role defs in azure rb…
tofikwest Jun 3, 2026
f28323e
Merge pull request #2985 from trycompai/worktree-cloud-posture-task-m…
tofikwest Jun 3, 2026
777fe9d
fix(integration-platform): preserve array credential fields so AWS ev…
tofikwest Jun 3, 2026
a93f479
fix(integrations): render config dropdowns inline so they work inside…
tofikwest Jun 3, 2026
0b55cd2
fix(app): hide evidence tasks not added to the org in integration views
tofikwest Jun 3, 2026
47f2442
Merge pull request #3003 from trycompai/tofik/fix-aws-evidence-region…
tofikwest Jun 3, 2026
4ba2447
Merge branch 'main' into tofik/hide-not-added-evidence-tasks
tofikwest Jun 3, 2026
c9f1d7d
Merge pull request #3006 from trycompai/tofik/hide-not-added-evidence…
tofikwest Jun 3, 2026
f6048a2
fix(app): count only added evidence tasks on the service card
tofikwest Jun 3, 2026
f4fa286
Merge branch 'main' into tofik/service-card-evidence-count
tofikwest Jun 3, 2026
8e6f4ef
fix(app): keep addedTemplateIds undefined when taskTemplates absent
tofikwest Jun 3, 2026
e47a500
Merge remote-tracking branch 'origin/tofik/service-card-evidence-coun…
tofikwest Jun 3, 2026
97488b4
Merge pull request #3007 from trycompai/tofik/service-card-evidence-c…
tofikwest Jun 3, 2026
9478bab
Merge branch 'main' into tofik/fix-integration-select-dropdown-portal
tofikwest Jun 3, 2026
df188a1
Merge pull request #3005 from trycompai/tofik/fix-integration-select-…
tofikwest Jun 3, 2026
23e68d2
fix(integration-platform): assume AWS customer role via the roleAssum…
tofikwest Jun 3, 2026
ad04fb2
Merge branch 'main' into tofik/aws-evidence-roleassumer-hop
tofikwest Jun 3, 2026
c441e5a
Merge pull request #3008 from trycompai/tofik/aws-evidence-roleassume…
tofikwest Jun 3, 2026
ffa5c91
fix(integrations): make config dropdown clickable via pointer-events,…
tofikwest Jun 3, 2026
adc804d
Merge pull request #3010 from trycompai/tofik/fix-integration-dropdow…
tofikwest Jun 3, 2026
7624405
fix(integration-platform): attach evidence to all IAM/CloudTrail chec…
tofikwest Jun 3, 2026
0d7c7fe
fix(app): keep integration check dropdowns open
tofikwest Jun 3, 2026
44dfbb9
Merge branch 'main' into tofik/aws-check-evidence
tofikwest Jun 3, 2026
591b201
Merge pull request #3012 from trycompai/fix/evident-check-select-drop…
tofikwest Jun 3, 2026
2d09795
fix(integration-platform): enrich evidence with the determining value…
tofikwest Jun 3, 2026
4957cac
Merge remote-tracking branch 'origin/tofik/aws-check-evidence' into t…
tofikwest Jun 3, 2026
ecb8a71
Merge branch 'main' into tofik/aws-check-evidence
tofikwest Jun 3, 2026
ecc98cf
fix(integration-platform): align Azure diagnostic-export evidence wit…
tofikwest Jun 3, 2026
f1cc7b3
Merge remote-tracking branch 'origin/tofik/aws-check-evidence' into t…
tofikwest Jun 3, 2026
ab975e3
Merge pull request #3011 from trycompai/tofik/aws-check-evidence
tofikwest Jun 3, 2026
8960820
fix(integrations): refresh oauth tokens during checks
tofikwest Jun 3, 2026
20041cf
fix(integrations): harden oauth refresh handling
tofikwest Jun 3, 2026
a080ec8
Merge pull request #3013 from trycompai/fix/cloud-oauth-token-refresh
tofikwest Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/api/src/cloud-security/azure-remediation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -643,9 +643,12 @@ export class AzureRemediationService {
connectionId,
{
tokenUrl: oauthConfig.tokenUrl,
refreshUrl: oauthConfig.refreshUrl,
clientId: oauthCreds.clientId,
clientSecret: oauthCreds.clientSecret,
clientAuthMethod: oauthConfig.clientAuthMethod,
scope: oauthCreds.scopes.join(' '),
tokenParams: oauthConfig.tokenParams,
},
);
if (token) return token;
Expand Down
3 changes: 3 additions & 0 deletions apps/api/src/cloud-security/cloud-security.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,12 @@ export class CloudSecurityService {
const accessToken =
await this.credentialVaultService.getValidAccessToken(connectionId, {
tokenUrl: oauthConfig.tokenUrl,
refreshUrl: oauthConfig.refreshUrl,
clientId: oauthCreds.clientId,
clientSecret: oauthCreds.clientSecret,
clientAuthMethod: oauthConfig.clientAuthMethod,
scope: oauthCreds.scopes.join(' '),
tokenParams: oauthConfig.tokenParams,
});

if (!accessToken) {
Expand Down
3 changes: 3 additions & 0 deletions apps/api/src/cloud-security/gcp-remediation.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -677,9 +677,12 @@ export class GcpRemediationService {
connectionId,
{
tokenUrl: oauthConfig.tokenUrl,
refreshUrl: oauthConfig.refreshUrl,
clientId: oauthCreds.clientId,
clientSecret: oauthCreds.clientSecret,
clientAuthMethod: oauthConfig.clientAuthMethod,
scope: oauthCreds.scopes.join(' '),
tokenParams: oauthConfig.tokenParams,
},
);
if (token) return token;
Expand Down
54 changes: 50 additions & 4 deletions apps/api/src/integration-platform/controllers/checks.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ import {
import { ConnectionRepository } from '../repositories/connection.repository';
import { ConnectionService } from '../services/connection.service';
import { CredentialVaultService } from '../services/credential-vault.service';
import { OAuthCredentialsService } from '../services/oauth-credentials.service';
import { ProviderRepository } from '../repositories/provider.repository';
import { CheckRunRepository } from '../repositories/check-run.repository';
import { getStringValue, toStringCredentials } from '../utils/credential-utils';
import { getStringValue } from '../utils/credential-utils';

// Class (not interface) so @nestjs/swagger emits a body schema, plus a
// class-validator decorator so the ValidationPipe whitelist accepts the field.
Expand Down Expand Up @@ -67,6 +68,7 @@ export class ChecksController {
private readonly connectionRepository: ConnectionRepository,
private readonly providerRepository: ProviderRepository,
private readonly credentialVaultService: CredentialVaultService,
private readonly oauthCredentialsService: OAuthCredentialsService,
private readonly checkRunRepository: CheckRunRepository,
private readonly connectionService: ConnectionService,
) {}
Expand Down Expand Up @@ -247,6 +249,48 @@ export class ChecksController {
`Running checks for connection ${connectionId} (${provider.slug})${body.checkId ? ` - check: ${body.checkId}` : ''}`,
);

let accessToken = getStringValue(credentials.access_token);
let onTokenRefresh: (() => Promise<string | null>) | undefined;
if (manifest.auth.type === 'oauth2') {
const oauthConfig = manifest.auth.config;
const supportsRefresh = oauthConfig.supportsRefreshToken !== false;

if (supportsRefresh) {
const oauthCredentials =
await this.oauthCredentialsService.getCredentials(
provider.slug,
organizationId,
);

if (oauthCredentials) {
const refreshConfig = {
tokenUrl: oauthConfig.tokenUrl,
refreshUrl: oauthConfig.refreshUrl,
clientId: oauthCredentials.clientId,
clientSecret: oauthCredentials.clientSecret,
clientAuthMethod: oauthConfig.clientAuthMethod,
scope: oauthCredentials.scopes.join(' '),
tokenParams: oauthConfig.tokenParams,
};

const validAccessToken =
await this.credentialVaultService.getValidAccessToken(
connectionId,
refreshConfig,
);
if (validAccessToken) {
accessToken = validAccessToken;
}

onTokenRefresh = () =>
this.credentialVaultService.refreshOAuthTokens(
connectionId,
refreshConfig,
);
}
}
}

// Create a check run record
const checkRun = await this.checkRunRepository.create({
connectionId,
Expand All @@ -256,16 +300,18 @@ export class ChecksController {

try {
// Run checks
const accessToken = getStringValue(credentials.access_token);
const stringCredentials = toStringCredentials(credentials);
const result = await runAllChecks({
manifest,
accessToken,
credentials: stringCredentials,
// Pass decrypted credentials through unchanged. Collapsing array fields
// here (e.g. AWS `regions`) made custom-auth checks see no regions and
// skip with "connection not configured".
credentials,
variables,
connectionId,
organizationId: connection.organizationId,
checkId: body.checkId,
onTokenRefresh,
logger: {
info: (msg, data) => this.logger.log(msg, data),
warn: (msg, data) => this.logger.warn(msg, data),
Expand Down
Loading
Loading