409e92d6ae
Build and Push Docker Images / Build Docker Image (push) Has been cancelled
Build and Push Docker Images / Build Railway Docker Image (push) Has been cancelled
Build and Publish n8n Docker Image / test-image (push) Has been cancelled
Dependency Compatibility Check / Fresh Install Dependency Check (push) Has been cancelled
Build and Publish n8n Docker Image / build-and-push (push) Has been cancelled
Build and Publish n8n Docker Image / create-release (push) Has been cancelled
Automated Release / Detect Version Change (push) Has been cancelled
Automated Release / Generate Release Notes (push) Has been cancelled
Automated Release / Create GitHub Release (push) Has been cancelled
Automated Release / Package MCPB Bundle (push) Has been cancelled
Automated Release / Build and Verify (push) Has been cancelled
Automated Release / Publish to NPM (push) Has been cancelled
Automated Release / Build and Push Docker Images (push) Has been cancelled
Automated Release / Update Documentation (push) Has been cancelled
Automated Release / Notify Release Completion (push) Has been cancelled
Secret Scan / secretlint (push) Has been cancelled
Test Suite / test (push) Has been cancelled
Test Suite / cjs-runtime (push) Has been cancelled
Test Suite / publish-results (push) Has been cancelled
62 lines
2.0 KiB
JavaScript
62 lines
2.0 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
const { execFileSync } = require('child_process');
|
|
const path = require('path');
|
|
|
|
const tempDir = path.join(process.cwd(), 'temp', 'n8n-docs');
|
|
|
|
console.log('🔍 Debugging Slack documentation search...\n');
|
|
|
|
// Search for all Slack related files.
|
|
//
|
|
// Use `execFileSync` with an argv array (not `execSync` with a single
|
|
// shell string) so `tempDir` — which comes from `process.cwd()` and is
|
|
// therefore attacker-influenceable if the script is invoked from a
|
|
// directory with shell metacharacters — cannot be interpreted as shell
|
|
// syntax. Addresses CodeQL js/shell-command-injection-from-environment.
|
|
console.log('All Slack-related markdown files:');
|
|
try {
|
|
const allSlackFiles = execFileSync(
|
|
'find',
|
|
[
|
|
path.join(tempDir, 'docs/integrations/builtin'),
|
|
'-name', '*slack*.md',
|
|
'-type', 'f',
|
|
],
|
|
{ encoding: 'utf-8' }
|
|
).trim().split('\n').filter(Boolean);
|
|
|
|
allSlackFiles.forEach(file => {
|
|
console.log(` - ${file}`);
|
|
});
|
|
} catch (error) {
|
|
console.log(' No files found');
|
|
}
|
|
|
|
console.log('\n📄 Checking file paths:');
|
|
const possiblePaths = [
|
|
'docs/integrations/builtin/app-nodes/n8n-nodes-base.Slack.md',
|
|
'docs/integrations/builtin/app-nodes/n8n-nodes-base.slack.md',
|
|
'docs/integrations/builtin/core-nodes/n8n-nodes-base.Slack.md',
|
|
'docs/integrations/builtin/core-nodes/n8n-nodes-base.slack.md',
|
|
'docs/integrations/builtin/trigger-nodes/n8n-nodes-base.Slack.md',
|
|
'docs/integrations/builtin/trigger-nodes/n8n-nodes-base.slack.md',
|
|
'docs/integrations/builtin/credentials/slack.md',
|
|
];
|
|
|
|
const fs = require('fs');
|
|
possiblePaths.forEach(p => {
|
|
const fullPath = path.join(tempDir, p);
|
|
const exists = fs.existsSync(fullPath);
|
|
console.log(` ${exists ? '✓' : '✗'} ${p}`);
|
|
|
|
if (exists) {
|
|
// Read first few lines
|
|
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
const lines = content.split('\n').slice(0, 10);
|
|
const title = lines.find(l => l.includes('title:'));
|
|
if (title) {
|
|
console.log(` Title: ${title.trim()}`);
|
|
}
|
|
}
|
|
}); |