We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cee33c8 commit d0106b4Copy full SHA for d0106b4
danger/dangerfile.js
@@ -196,14 +196,15 @@ async function checkFromExternalChecks() {
196
const workspaceDir = '/github/workspace';
197
198
const path = require('path');
199
+ const fs = require('fs');
200
const customPath = path.join(workspaceDir, extraDangerFilePath);
201
// Ensure the resolved path is within workspace
202
const resolvedPath = fs.realpathSync(customPath);
203
if (!resolvedPath.startsWith(workspaceDir)) {
204
fail(`Invalid dangerfile path: ${extraDangerFilePath}. Must be within workspace.`);
205
return;
206
}
-
207
+
208
const extraModule = require(customPath);
209
if (typeof extraModule !== 'function') {
210
warn(`EXTRA_DANGERFILE must export a function at ${customPath}`);
0 commit comments