mirror of
https://github.com/Icinga/icingadb.git
synced 2026-06-09 00:42:37 -04:00
Merge pull request #1074 from Icinga/golangci-lint-fixup-20260218
Some checks failed
Compliance / compliance (push) Has been cancelled
Build and Publish Container Image / build-and-publish-container-image (push) Has been cancelled
Go / build-test (macos-latest) (push) Has been cancelled
Go / build-test (ubuntu-latest) (push) Has been cancelled
Go / lint (push) Has been cancelled
Go / vet (push) Has been cancelled
Go / fmt (push) Has been cancelled
Go / modtidy (push) Has been cancelled
Go / vendor-diff (push) Has been cancelled
Integration Tests / MySQL (push) Has been cancelled
Integration Tests / PostgreSQL (push) Has been cancelled
SQL / MySQL 5.5 (push) Has been cancelled
SQL / MySQL 5.6 (push) Has been cancelled
SQL / MariaDB 10.1 (push) Has been cancelled
SQL / MariaDB 10.2 (push) Has been cancelled
SQL / MariaDB 10.3 (push) Has been cancelled
SQL / MariaDB 10.4 (push) Has been cancelled
SQL / MariaDB 10.5 (push) Has been cancelled
SQL / MariaDB 10.6 (push) Has been cancelled
SQL / MariaDB 10.7 (push) Has been cancelled
SQL / MariaDB latest (push) Has been cancelled
SQL / MySQL 5.7 (push) Has been cancelled
SQL / MySQL 8 (push) Has been cancelled
SQL / MySQL latest (push) Has been cancelled
SQL / PostgreSQL 10 (push) Has been cancelled
SQL / PostgreSQL 11 (push) Has been cancelled
SQL / PostgreSQL 12 (push) Has been cancelled
SQL / PostgreSQL 13 (push) Has been cancelled
SQL / PostgreSQL 9.6 (push) Has been cancelled
SQL / PostgreSQL latest (push) Has been cancelled
Sync For-Container.md to Docker Hub / sync (push) Has been cancelled
Some checks failed
Compliance / compliance (push) Has been cancelled
Build and Publish Container Image / build-and-publish-container-image (push) Has been cancelled
Go / build-test (macos-latest) (push) Has been cancelled
Go / build-test (ubuntu-latest) (push) Has been cancelled
Go / lint (push) Has been cancelled
Go / vet (push) Has been cancelled
Go / fmt (push) Has been cancelled
Go / modtidy (push) Has been cancelled
Go / vendor-diff (push) Has been cancelled
Integration Tests / MySQL (push) Has been cancelled
Integration Tests / PostgreSQL (push) Has been cancelled
SQL / MySQL 5.5 (push) Has been cancelled
SQL / MySQL 5.6 (push) Has been cancelled
SQL / MariaDB 10.1 (push) Has been cancelled
SQL / MariaDB 10.2 (push) Has been cancelled
SQL / MariaDB 10.3 (push) Has been cancelled
SQL / MariaDB 10.4 (push) Has been cancelled
SQL / MariaDB 10.5 (push) Has been cancelled
SQL / MariaDB 10.6 (push) Has been cancelled
SQL / MariaDB 10.7 (push) Has been cancelled
SQL / MariaDB latest (push) Has been cancelled
SQL / MySQL 5.7 (push) Has been cancelled
SQL / MySQL 8 (push) Has been cancelled
SQL / MySQL latest (push) Has been cancelled
SQL / PostgreSQL 10 (push) Has been cancelled
SQL / PostgreSQL 11 (push) Has been cancelled
SQL / PostgreSQL 12 (push) Has been cancelled
SQL / PostgreSQL 13 (push) Has been cancelled
SQL / PostgreSQL 9.6 (push) Has been cancelled
SQL / PostgreSQL latest (push) Has been cancelled
Sync For-Container.md to Docker Hub / sync (push) Has been cancelled
icingadb-migrate: Address golangci-lint gosec reports
This commit is contained in:
commit
bed43bd153
2 changed files with 3 additions and 1 deletions
|
|
@ -289,7 +289,7 @@ func convertDowntimeRows(
|
|||
// with factor 1,000 should not overflow anything. In theory, at least. To make sure, invalid values are capped.
|
||||
var flexibleDuration uint64
|
||||
if durationSec := row.Duration; durationSec >= 0 && durationSec < math.MaxUint64/1_000 {
|
||||
flexibleDuration = uint64(durationSec) * 1_000
|
||||
flexibleDuration = uint64(durationSec) * 1_000 // #nosec G115 -- int64 -> uint64 cannot overflow, check above
|
||||
}
|
||||
|
||||
downtimeHistory = append(downtimeHistory, &history.DowntimeHistory{
|
||||
|
|
|
|||
|
|
@ -129,6 +129,8 @@ func parseConfig(f *Flags) (_ *Config, exit int) {
|
|||
}
|
||||
|
||||
if err := yaml.NewDecoder(cf, yaml.DisallowUnknownField()).Decode(c); err != nil {
|
||||
// #nosec G705 -- this error message should do no harm in the output, being printed to stderr
|
||||
// on a terminal and not used as an HTML page or the like
|
||||
_, _ = fmt.Fprintf(os.Stderr, "can't parse config file: %s\n", err.Error())
|
||||
return nil, 2
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue