Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve codecov #1373

Merged
merged 13 commits into from
Jul 30, 2024
Merged

Improve codecov #1373

merged 13 commits into from
Jul 30, 2024

Conversation

chuntaojun
Copy link
Member

Please provide issue(s) of this PR:
Fixes #

To help us figure out who should review this PR, please put an X in all the areas that this PR affects.

  • ApiServer
  • Auth
  • Configuration
  • Naming
  • HealthCheck
  • Metrics
  • Docs
  • Installation
  • Performance and Scalability
  • Test and Release

Please check any characteristics that apply to this pull request.

  • Does not have any user-facing changes. This may include API changes, behavior changes, performance improvements, etc.

@polaris-test-bot
Copy link

2024-07-30 11:47:11: =========TEST START==========

@chuntaojun chuntaojun merged commit 890503a into polarismesh:main Jul 30, 2024
2 of 8 checks passed
@daheige
Copy link
Member

daheige commented Jul 30, 2024

LGTM


predicates := types.LoadAuthPolicyPredicates(ctx)

rules := make([]*authcommon.StrategyDetail, 0, args.Limit)

Check failure

Code scanning / CodeQL

Slice memory allocation with excessive size value High

This memory allocation depends on a
user-provided value
.
This memory allocation depends on a
user-provided value
.
This memory allocation depends on a
user-provided value
.
This memory allocation depends on a
user-provided value
.
This memory allocation depends on a
user-provided value
.
This memory allocation depends on a
user-provided value
.
This memory allocation depends on a
user-provided value
.
This memory allocation depends on a
user-provided value
.
@@ -381,23 +359,23 @@
}

principalRole, _ := strconv.ParseInt(principalType, 10, 64)
if err := model.CheckPrincipalType(int(principalRole)); err != nil {
if err := authcommon.CheckPrincipalType(int(principalRole)); err != nil {

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types High

Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
to a lower bit size type int without an upper bound check.
err error
)

// 找这个用户所关联的用户组
if model.PrincipalType(principalRole) == model.PrincipalUser {
if authcommon.PrincipalType(principalRole) == authcommon.PrincipalUser {

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types High

Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
to a lower bit size type int without an upper bound check.
@@ -407,7 +385,7 @@
}
}

pResources, err := svr.storage.GetStrategyResources(principalId, model.PrincipalType(principalRole))
pResources, err := svr.storage.GetStrategyResources(principalId, authcommon.PrincipalType(principalRole))

Check failure

Code scanning / CodeQL

Incorrect conversion between integer types High

Incorrect conversion of a signed 64-bit integer from
strconv.ParseInt
to a lower bit size type int without an upper bound check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants