Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

add secret scanning status to api

Maidul Islam993abd092197
diff --git a/backend/src/index.ts b/backend/src/index.ts
index 251340526b..b5f1b6ddd6 100644
--- a/backend/src/index.ts
+++ b/backend/src/index.ts
@@ -88,7 +88,7 @@ const main = async () => {
})
);
- if (await getSecretScanningGitAppId()) {
+ if (await getSecretScanningGitAppId() && await getSecretScanningWebhookSecret() && await getSecretScanningPrivateKey()) {
const probot = new Probot({
appId: await getSecretScanningGitAppId(),
privateKey: await getSecretScanningPrivateKey(),
diff --git a/backend/src/routes/status/status.ts b/backend/src/routes/status/status.ts
index 0af4bb5c2c..ce13775cb8 100644
--- a/backend/src/routes/status/status.ts
+++ b/backend/src/routes/status/status.ts
@@ -1,5 +1,5 @@
import express, { Request, Response } from "express";
-import { getSmtpConfigured } from "../../config";
+import { getSecretScanningGitAppId, getSecretScanningPrivateKey, getSecretScanningWebhookSecret, getSmtpConfigured } from "../../config";
const router = express.Router();
@@ -10,6 +10,7 @@ router.get(
date: new Date(),
message: "Ok",
emailConfigured: await getSmtpConfigured(),
+ secretScanningConfigured: await getSecretScanningGitAppId() && await getSecretScanningWebhookSecret() && await getSecretScanningPrivateKey(),
})
}
);