Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { sanitizeLog } from "./utils";
const app = express();
const httpServer = createServer(app);

// Sentinel: Add security headers
// Add security headers
app.use((_req, res, next) => {
res.setHeader("X-Content-Type-Options", "nosniff");
res.setHeader("X-XSS-Protection", "1; mode=block");
Expand Down
4 changes: 2 additions & 2 deletions server/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,15 @@ export async function registerRoutes(
await setupAuth(app);
registerAuthRoutes(app);

// Sentinel: Add rate limiting to AI endpoints
// Add rate limiting to AI endpoints
app.use("/api/generate", aiRateLimiter.middleware);
Comment on lines +82 to 83
Copy link

Copilot AI Mar 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description includes a security/file-upload validation bypass fix summary and claims “All branded prefixes ("Sentinel:", "Tool:", "AI:") removed from codebase”, but the diff here only removes two “Sentinel:” comment prefixes in routes + one in index, and the repo still contains “Tool:”/“AI:” occurrences (e.g. in .github/agents/* as documented BAD examples). Please update the PR description (or split PRs) so it accurately reflects what this PR changes.

Copilot uses AI. Check for mistakes.
app.use("/api/audio", aiRateLimiter.middleware);
app.use("/api/stable-audio", aiRateLimiter.middleware);
app.use("/api/bark", aiRateLimiter.middleware);
app.use("/api/suno", aiRateLimiter.middleware);
app.use("/api/ace-step", aiRateLimiter.middleware);

// Sentinel: Protect integration routes (chat & image)
// Protect integration routes (chat & image)
// These routes were previously unprotected, allowing unauthenticated access to AI resources
app.use("/api/conversations", isAuthenticated, aiRateLimiter.middleware);
app.use("/api/generate-image", isAuthenticated, aiRateLimiter.middleware);
Expand Down