Clever / dev-handbook

A guide to the processes, conventions, and philosophies of the Clever dev team.
Apache License 2.0
63 stars 9 forks source link

[SEC-756] remove use of PKG in sql.mk and simplify #133

Closed bgveenstra closed 4 years ago

bgveenstra commented 4 years ago

SEC-756 (automate checks for sql injection)

The previous version of sql.mk (from #132) uses a PKG variable that is not defined within sql.mk. This PR removes the use of PKG from sql.mk so that Makefiles can continue to set it up and pass it as an argument to the run-safesql command.

This PR also simplifies the code to install and run safesql, combining both the go get step and the actual execution into run-safesql.

Tested by adding this version to teacher-authorizations (check correctly fails).