fix(policy): DSPX-4607 clear sloglint and SA1019 lint findings - #3977
Open
dmihalcik-virtru wants to merge 1 commit into
Open
fix(policy): DSPX-4607 clear sloglint and SA1019 lint findings#3977dmihalcik-virtru wants to merge 1 commit into
dmihalcik-virtru wants to merge 1 commit into
Conversation
|
Warning Review limit reachedNext included review available in 42 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (14)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This was referenced Sep 4, 2026
Contributor
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Signed-off-by: Dave Mihalcik <dmihalcik@virtru.com>
dmihalcik-virtru
force-pushed
the
fix/lint-policy-sloglint
branch
from
September 4, 2026 13:13
0b6af81 to
c2664fd
Compare
Contributor
This was referenced Sep 4, 2026
Open
Contributor
Benchmark results, click to expandBenchmark authorization.GetDecisions Results:
Benchmark authorization.v2.GetMultiResourceDecision Results:
Benchmark Statistics
Bulk Benchmark Results
TDF3 Benchmark Results:
|
Contributor
|
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of the DSPX-4607 burndown of the 351 pre-existing findings that golangci-lint v2.13.2 (#3965) surfaced and v2.8.0 never reported. They don't fail CI today — the lint step runs with
only-new-issues: true— but any future PR touching one of these lines would trip on them.This PR covers the
service/policyslice (48 findings). It is independent of the other DSPX-4607 PRs: no file overlap, and it does not touch.golangci.yaml.Changes
sloglint (28) — operational log keys renamed to snake_case, matching the linter's configured
key-naming-case:dynamicvaluemappingdynamicValueMapping→dynamic_value_mappingkeymanagementkeyManagementService→key_management_service(×5)namespacesnamespaceKas→namespace_kas,namespaceKey→namespace_keyobligationsobligation value→obligation_value,obligation trigger→obligation_triggerregisteredresourcesregistered resource→registered_resource,registered resource value→registered_resource_valueresourcemappingresourceMappingGroup→resource_mapping_group,resourceMapping→resource_mappingsubjectmappingsubjectMapping→subject_mapping,subjectProperties→subject_properties,subjectConditionSet→subject_condition_set,subjectConditionSet fields→subject_condition_set_fieldsThese are all diagnostic keys — none is an audit event field (those live in
service/logger/auditand are deliberately left alone, see the core PR) and no test asserts on any of these strings.staticcheck SA1019 (20) —
//nolint:staticcheckwith a per-site reason rather than migrating off the deprecated proto fields, so this PR stays a lint-only change:db/grant_mappings.go,db/key_access_server_registry.go— responses still populate the deprecatedPublicKeyfor clients that have not moved to multiple key pairs, plus the compatibility path for the deprecatedListKeyAccessServerGrantsRPC.attributes/attributes_test.go,namespaces/namespaces_test.go,kasregistry/key_access_server_registry_test.go,keymanagement/key_management_test.go— these cases exist specifically to validate the deprecatedId/Nameidentifiers, so they have to keep setting them.Testing
golangci-lint runoverservice/policy/...— 0 findings, verified under both the tuned config from chore(ci): DSPX-4607 linter cfg: tune goconst; schema updates #3968 andmain's config, so merge order doesn't matter.make fmtcd service && go test ./policy/... -race— pass.Related
#3965 (linter bump) · #3968 (config tuning) · #3969 · #3970 · #3971 · #3973 · #3974 · #3975
DSPX-4607 burndown index
.golangci.yamlgoconst tuning +gomodguard_v2migration (merged)otdfctl), fix(kas): DSPX-4607 use snake_case slog key in rewrap test fake #3970 (service/kas), chore(core): DSPX-4607 drop stale lib/fixtures nolint directives and reuse keycloakBoolTrue #3971 (lib/fixtures), fix(sdk): DSPX-4607 canonicalize DPoP headers and extract zipstream constants #3973 (sdk), fix(examples): DSPX-4607 clear goconst and SA1019 lint findings #3974 (examples), fix(ci): DSPX-4607 clear tests-bdd goconst, gosec, nestif and sloglint findings #3975 (tests-bdd), fix(core): DSPX-4607 clear sloglint, goconst, nolintlint and SA1019 findings #3978 (servicecore)