mirror of
https://github.com/securego/gosec.git
synced 2025-11-27 22:28:20 +02:00
Auto-detect TLS MinVersion integer base (#903)
This commit is contained in:
@@ -107,7 +107,7 @@ func (t *insecureConfigTLS) processTLSConfVal(n *ast.KeyValueExpr, c *gosec.Cont
|
|||||||
tObj := imp.Scope().Lookup(sel)
|
tObj := imp.Scope().Lookup(sel)
|
||||||
if cst, ok := tObj.(*types.Const); ok {
|
if cst, ok := tObj.(*types.Const); ok {
|
||||||
// ..got the value check if this can be translated
|
// ..got the value check if this can be translated
|
||||||
if minVersion, err := strconv.ParseInt(cst.Val().String(), 10, 64); err == nil {
|
if minVersion, err := strconv.ParseInt(cst.Val().String(), 0, 64); err == nil {
|
||||||
t.actualMinVersion = minVersion
|
t.actualMinVersion = minVersion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user