mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-19 09:40:12 +00:00
ci(gosec): silence G101 false positives on PAT context keys and scope const
gosec G101 flags apiTokenCtxKey, apiTokenLastUsedCtxKey, and the ScopeNotificationGroupWrite identifier as hardcoded credentials. They are context-key names and a scope string, not secrets. Annotate them with #nosec G101 (matching the existing JWTSecretEnvKey precedent) so the gosec CI step passes without disabling the rule globally. Co-authored-by: cloudcode <cloudcode@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ const (
|
||||
ScopeNotificationDelete = "nezha:notification:delete"
|
||||
|
||||
ScopeNotificationGroupRead = "nezha:notification-group:read"
|
||||
ScopeNotificationGroupWrite = "nezha:notification-group:write"
|
||||
ScopeNotificationGroupWrite = "nezha:notification-group:write" // #nosec G101 -- scope identifier, not a credential
|
||||
ScopeNotificationGroupDelete = "nezha:notification-group:delete"
|
||||
|
||||
ScopeTransferRead = "nezha:transfer:read"
|
||||
|
||||
Reference in New Issue
Block a user