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

🐛 Fix loop aliasing errors causing linter to fail. #3414

Merged
merged 1 commit into from
Aug 23, 2023

Conversation

spencerschrock
Copy link
Member

@spencerschrock spencerschrock commented Aug 22, 2023

What kind of change does this PR introduce?

bug fix

What is the current behavior?

Loop aliasing produces incorrect behavior. The linter started detecting this after #3411 got merged.

G601: Implicit memory aliasing in for loop. (gosec)

What is the new behavior (if this is a feature change)?**

We create a fresh copy of data so multiple things aren't pointing to the same data by accident.

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

https://github.com/ossf/scorecard/actions/runs/5942446350

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)


Signed-off-by: Spencer Schrock <[email protected]>
@spencerschrock spencerschrock temporarily deployed to gitlab August 22, 2023 20:10 — with GitHub Actions Inactive
@spencerschrock spencerschrock temporarily deployed to integration-test August 22, 2023 20:10 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #3414 (eefea13) into main (44bed38) will decrease coverage by 6.28%.
The diff coverage is 91.66%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3414      +/-   ##
==========================================
- Coverage   72.63%   66.35%   -6.28%     
==========================================
  Files         183      183              
  Lines       12930    12936       +6     
==========================================
- Hits         9392     8584     -808     
- Misses       3019     3869     +850     
+ Partials      519      483      -36     

@spencerschrock spencerschrock merged commit 93875dd into ossf:main Aug 23, 2023
41 of 42 checks passed
@spencerschrock spencerschrock deleted the fix/loop-aliasing branch August 23, 2023 00:48
ashearin pushed a commit to kgangerlm/scorecard-gitlab that referenced this pull request Nov 13, 2023
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.

2 participants