mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-24 04:51:51 +00:00
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>
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user