Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixinator is scanning code that is commented out if the comment block has nested comment blocks #17

Open
jbartlett777 opened this issue Jan 11, 2025 · 1 comment

Comments

@jbartlett777
Copy link

<!--- Main comment block
	<!--- Secondary comment block --->
	<cfquery name="qry" datasource="#DSN#">
		EXEC StoredProc '#Param1#', '#Param2#'
	</cfquery>
--->

It appears that the logic behind identifying the comment blocks is considering the comment end on the 2nd line as being the close of the comment block that started on line 1.

[HIGH] SQL Injection finding on line 5 of fixinator_testcase.cfm high confidence
Variables within a SQL statement must be passed as parameters to the database engine, for example by using cfqueryparam
/fixinator_testcase.cfm:5
    5: EXEC StoredProc '#Param1#', '#Param2#'

Possible Fixes:
        1) cfqueryparam: <cfqueryparam value="#Param2#">
        2) cfqueryparam varchar: <cfqueryparam value="#Param2#" cfsqltype="cf_sql_varchar">

If the secondary comment block is moved down below the query, there is no issue flagged.

@pfreitag
Copy link
Member

Thanks I believe it does have logic to deal with nested comments, but it does certainly appear to be an issue in this case. I will look into this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants