Remove old codacy linter comments

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2023-06-17 01:57:30 +02:00
parent 3350eebbc5
commit 28b62039a3
15 changed files with 0 additions and 26 deletions

View File

@@ -91,8 +91,6 @@ func (a *Agent) Start(_, dir string, extraArgs ...any) error {
return fmt.Errorf("failed to build: %w", err)
}
//#nosec G304 -- Test code is not controllable by attackers
//#nosec G302 -- Log file should be readable by user
a.logFile, err = os.OpenFile(logPath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0o644)
if err != nil {
return fmt.Errorf("failed to open log file: %w", err)

View File

@@ -50,8 +50,6 @@ func (s *GrpcSignalingNode) Start(_, dir string, extraArgs ...any) error {
return fmt.Errorf("failed to build: %w", err)
}
//#nosec G304 -- Test code is not controllable by attackers
//#nosec G302 -- Log file should be readable by user
s.logFile, err = os.OpenFile(logPath, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0o644)
if err != nil {
return fmt.Errorf("failed to open log file: %w", err)

View File

@@ -99,7 +99,6 @@ func (i *WireGuardInterface) WriteConfig() error {
fn := filepath.Join(wgcpath, fmt.Sprintf("%s.conf", i.Name))
//#nosec G304 -- Test code is not controllable by attackers
f, err := os.OpenFile(fn, os.O_CREATE|os.O_TRUNC|os.O_RDWR, 0o600)
if err != nil {
return fmt.Errorf("failed to open config file: %w", err)

View File

@@ -57,8 +57,6 @@ func SetupLoggingWithFile(fn string, truncate bool) *zap.Logger {
fl |= os.O_TRUNC
}
//#nosec G304 -- Test code is not controllable by attackers
//#nosec G302 -- Log file should be readable by users
f, err := os.OpenFile(fn, fl, 0o644)
if err != nil {
panic(fmt.Errorf("failed to open log file '%s': %w", fn, err))