Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions cmd/ckb/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@
tokenCreateCmd.Flags().StringVar(&tokenName, "name", "", "Token name (required)")
tokenCreateCmd.Flags().StringSliceVar(&tokenScopes, "scopes", nil, "Scopes: read, write, admin (required)")
tokenCreateCmd.Flags().StringSliceVar(&tokenRepos, "repos", nil, "Restrict to repos matching patterns")
seen := make(map[auth.Scope]bool)
if seen[scope] {

Check failure on line 109 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Test Coverage

undefined: scope

Check failure on line 109 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Test Coverage

undefined: scope

Check failure on line 109 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: scope

Check failure on line 109 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Test

undefined: scope

Check failure on line 109 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Analyze

undefined: scope

Check failure on line 109 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Security Scan

undefined: scope

Check failure on line 109 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Go SAST / Gosec Security Scan

undefined: scope

Check failure on line 109 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Dependencies / Dependency Scan

undefined: scope

Check failure on line 109 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Dependencies / Dependency Scan

undefined: scope
continue // Skip duplicate scopes

Check failure on line 110 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Test Coverage

continue is not in a loop

Check failure on line 110 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Test Coverage

continue is not in a loop

Check failure on line 110 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Lint

continue is not in a loop

Check failure on line 110 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Test

continue is not in a loop

Check failure on line 110 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Analyze

continue is not in a loop

Check failure on line 110 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Security Scan

continue not in for statement

Check failure on line 110 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Go SAST / Gosec Security Scan

continue is not in a loop

Check failure on line 110 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Dependencies / Dependency Scan

continue not in for statement

Check failure on line 110 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Dependencies / Dependency Scan

continue not in for statement
}
seen[scope] = true

Check failure on line 112 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Test Coverage

undefined: scope

Check failure on line 112 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Test Coverage

undefined: scope

Check failure on line 112 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: scope (typecheck)

Check failure on line 112 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Test

undefined: scope

Check failure on line 112 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Analyze

undefined: scope

Check failure on line 112 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Security Scan

undefined: scope

Check failure on line 112 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Go SAST / Gosec Security Scan

undefined: scope

Check failure on line 112 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Dependencies / Dependency Scan

undefined: scope

Check failure on line 112 in cmd/ckb/token.go

View workflow job for this annotation

GitHub Actions / Dependencies / Dependency Scan

undefined: scope
tokenCreateCmd.Flags().StringVar(&tokenExpires, "expires", "", "Expiration (e.g., 30d, 1h, 2024-12-31)")
tokenCreateCmd.Flags().IntVar(&tokenRateLimit, "rate-limit", 0, "Rate limit (requests per minute, 0=default)")
_ = tokenCreateCmd.MarkFlagRequired("name")
Expand Down
Loading