Compare commits

...

1 Commits

Author SHA1 Message Date
Sergio Garcia
9d33ff104a Potential fix for code scanning alert no. 55: Server-side request forgery
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-08-01 19:29:47 +08:00

View File

@@ -278,6 +278,13 @@ export const getComplianceCsv = async (
scanId: string,
complianceId: string,
) => {
// Only allow alphanumeric, dash, and underscore for IDs
const idPattern = /^[a-zA-Z0-9_-]+$/;
if (!idPattern.test(scanId) || !idPattern.test(complianceId)) {
return {
error: "Invalid scan or compliance ID format.",
};
}
const headers = await getAuthHeaders({ contentType: false });
const url = new URL(