Skip to content

Commit cc190bd

Browse files
Potential fix for code scanning alert no. 156: SQL query built from user-controlled sources (#709)
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 5c3fa2f commit cc190bd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vr/vulns/web/metrics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def component_metrics(id):
3737
schema = VulnerabilitiesSchema(many=True)
3838
assets = schema.dump(vuln_all)
3939
NAV['appbar'] = 'metrics'
40-
app = BusinessApplications.query.filter(text(f'ID={id}')).first()
40+
app = BusinessApplications.query.filter(text('ID = :id').params(id=id)).first()
4141
app_data = {'ID': id, 'ApplicationName': app.ApplicationName, 'Component': app.ApplicationAcronym}
4242
findings_map = {}
4343
reviewed_findings = parse_vuln_findings(vuln_all, 'reviewed')

0 commit comments

Comments
 (0)