1
0
mirror of https://github.com/securego/gosec.git synced 2025-06-18 23:57:33 +02:00

26 Commits

Author SHA1 Message Date
e0cca6fe95 Update what message for G104 (#1282) 2025-01-06 15:41:33 +01:00
de2c6a36fa Extract the issue in its own package 2023-02-16 09:45:28 +01:00
afc9903ba9 Fix use rule IDs to retrieve the rule config 2022-03-28 20:28:02 +02:00
1933cba5b5 Add os.Unsetenv to NoErrorCheck whitelist (#702)
it always return nil err
2021-10-05 19:30:34 +02:00
3c230ac0f7 errors.go: add Hash.Write() to the white list. (#648) 2021-06-13 13:30:49 +02:00
c6e10af40f Handle properly the gosec module version v2
Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
2020-04-06 09:06:23 -07:00
3e069e7756 Fix the errors rule whitelist to work on types methods
Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
2020-01-29 09:41:46 +01:00
f3445245a2 Fix the whitelist on G104 rule and add a test
Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
2019-06-25 11:15:11 +02:00
f87af5fa72 Detect the unhandled errors even though they are explicitly ignored if the 'audit: enabled' setting is defined in the global configuration (#274)
* Define more explicit the global options in the configuration

* Detect in audit mode the unhandled errors even thought they are explicitly ignored
2019-01-14 21:37:40 +10:00
14ed63d558 Do not flag the unhandled errors which are explicitly ignored
fixes #270
2019-01-14 10:06:30 +01:00
adb42220da whitelist strings.Builder method in rule G104 2018-11-11 09:57:28 +01:00
762ff3a709 Allow quoted strings to be used to format SQL queries (#240)
* Support stripping vendor paths when matching calls

* Factor out matching of formatter string

* Quoted strings are safe to use with SQL str formatted strings

* Add test for allowing quoted strings with string formatters

* Install the pq package for tests to pass
2018-09-25 10:40:05 +03:00
893b87b343 Replace gas with gosec everywhere in the project 2018-07-19 18:42:25 +02:00
da26f64208 Rename github org (#214) 2018-07-19 17:40:28 +10:00
2115402409 Add the rule ID to issues (#188) 2018-03-12 18:18:44 +10:00
1429033aca Add support for #excluding specific rules 2018-03-02 23:44:51 +00:00
6cd7a6d7fe Add Fprint, Fprintf, Fprintln to NoErrorCheck whitelist 2018-02-07 14:13:17 +01:00
af25ac1f6e fix golint errors picked up by hound-ci 2017-12-13 22:35:47 +10:00
6943f9e5e4 Major rework of codebase
- Get rid of 'core' and move CLI to cmd/gas directory
- Migrate (most) tests to use Ginkgo and testutils framework
- GAS now expects package to reside in $GOPATH
- GAS now can resolve dependencies for better type checking (if package
  on GOPATH)
- Simplified public API
2017-07-19 15:17:00 -06:00
bf78d027a9 Restructure and introduce a standalone config 2017-04-28 14:46:26 -07:00
cacf21f3c0 Restructure to focus on lib rather than cli 2017-04-26 08:08:46 -07:00
129be1561b Update error test case
There were several issues with the error test case that have been
addressed in this commit.

- It is possible to specify a whitelist of calls that error handling
  should be ignored for.
- Additional support for ast.ExprStmt for cases where the error is
  implicitly ignored.

There were several other additions to the helpers and call list in order
to support this type of functionality.

Fixes #54
2016-11-18 14:09:10 -08:00
bf103da519 Allow rules to register against multiple ast nodes
Update the AddRule interface to allow rules to register interest in
multiple ast.Nodes. Adds more flexibility to how rules can work, and was
needed to fix the hard coded credentials test specifically.
2016-11-13 12:55:31 -08:00
74b6633ee0 Updated imports to new repository location. 2016-11-02 16:54:20 -07:00
713949fe69 Rule selection rules
This makes the following changes:
- riles are identified by an ID
- include / exclude list now work
- rules are selected based on these lists
- blacklist rules are broken out into methods
- rule constructors now take the config map
- config file can be used to select rules
- CLI options embelish config selection options
2016-08-11 10:45:51 +01:00
4f3d620d37 Initial public release 2016-07-20 15:56:32 +01:00