mirror of
https://codeberg.org/cunicu/cunicu.git
synced 2025-09-26 21:01:14 +08:00
Remove old codacy linter comments
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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)
|
||||
|
@@ -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))
|
||||
|
Reference in New Issue
Block a user