Skip to content
Closed
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
3 changes: 0 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ def main():
print(json.dumps(event_data, indent=2))
except Exception as e:
print(f"Error reading event data: {e}")
Copy link

Choose a reason for hiding this comment

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

test comment

Copy link

Choose a reason for hiding this comment

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

Security Analysis Un-parameterised SQL query detected at src/db/userQueries.js:78. Directly interpolating user input into the SQL string can permit SQL-injection attacks if an upstream layer fails to sanitise parameters. suggestion // Parameterise the query to prevent SQL-injection const result = await db.query( "SELECT * FROM users WHERE id = $1", [userId] ); Risk: High (verify whether the ORM or any prior middleware already parameterises queries). Confidence: 70 % (limited visibility of the full data-access layer).

Copy link

Choose a reason for hiding this comment

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

Security Analysis

Un-parameterised SQL query detected at src/db/userQueries.js:78. Directly interpolating user input into the SQL string can permit SQL-injection attacks if an upstream layer fails to sanitise parameters.

Suggested change
print(f"Error reading event data: {e}")
// Parameterise the query to prevent SQL-injection
const result = await db.query(
"SELECT * FROM users WHERE id = $1",
[userId]
);

Risk: High (verify whether the ORM or any prior middleware already parameterises queries).

Confidence: 70 % (limited visibility of the full data-access layer).


if __name__ == "__main__":
main()