mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-05 20:26:44 +00:00
add telemetry for cloud secret scanning
This commit is contained in:
@@ -9,6 +9,7 @@ import MembershipOrg from "../models/membershipOrg";
|
|||||||
import { ADMIN, OWNER } from "../variables";
|
import { ADMIN, OWNER } from "../variables";
|
||||||
import User from "../models/user";
|
import User from "../models/user";
|
||||||
import { sendMail } from "../helpers";
|
import { sendMail } from "../helpers";
|
||||||
|
import TelemetryService from "./TelemetryService";
|
||||||
|
|
||||||
type SecretMatch = {
|
type SecretMatch = {
|
||||||
Description: string;
|
Description: string;
|
||||||
@@ -146,6 +147,18 @@ export default async (app: Probot) => {
|
|||||||
pusher_name: pusher.name
|
pusher_name: pusher.name
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const postHogClient = await TelemetryService.getPostHogClient();
|
||||||
|
if (postHogClient) {
|
||||||
|
postHogClient.capture({
|
||||||
|
event: "cloud secret scan",
|
||||||
|
distinctId: pusher.email,
|
||||||
|
properties: {
|
||||||
|
numberOfCommitsScanned: commits.length,
|
||||||
|
numberOfRisksFound: Object.keys(allFindingsByFingerprint).length,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user