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

chore: remove SCA & IaC #1039

Merged
merged 1 commit into from
Jan 13, 2025
Merged

chore: remove SCA & IaC #1039

merged 1 commit into from
Jan 13, 2025

Conversation

FlorianPerucki
Copy link

Remove SCA & IaC commands and related code

@FlorianPerucki FlorianPerucki requested a review from a team as a code owner January 3, 2025 15:46
@FlorianPerucki FlorianPerucki force-pushed the fperucki/remove-sca-iac branch 2 times, most recently from edc332c to 402a075 Compare January 3, 2025 15:56
Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.75%. Comparing base (28f5153) to head (58782e1).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1039      +/-   ##
==========================================
- Coverage   92.10%   91.75%   -0.35%     
==========================================
  Files         181      143      -38     
  Lines        7762     6040    -1722     
==========================================
- Hits         7149     5542    -1607     
+ Misses        613      498     -115     
Flag Coverage Δ
unittests 91.75% <100.00%> (-0.35%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@salome-voltz salome-voltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a first pass (the PR is a bit massive 😅 ) but I have found some dead code that should be removed. Also, If I understand correctly the scan mode "DIFF" is directly related to IaC scan so it might be worth looking into it to check if we can also remove it :)

@FlorianPerucki FlorianPerucki force-pushed the fperucki/remove-sca-iac branch 2 times, most recently from 8f68135 to 26d393c Compare January 8, 2025 15:44
@salome-voltz
Copy link
Collaborator

Sorry, I should have done that in my first review, I ran a static code analysis tool (deadcode) over the project. Here is the dead code related to SCA/IaC that I found :

  • display_beta_warning in ggshield/cmd/utils/common_decorators.py
  • class ConfigIgnoredElement in ggshield/core/config/user_config.py
  • variable REMOVED in Enum IncidentStatus in ggshield/core/constants.py
  • class NotAMergeRequestError in ggshield/core/errors.py
  • file_diff_info in ggshield/core/text_utils.py
  • get_diff_files_status in ggshield/utils/git_shell.py

I wasn't sure if we should keep the code that could be useful in the future, but after discussing the matter with Aurélien, "throw away every code you can" is the project's policy.

Apart from these, the PR looks good to me! Thank you for the tedious work!

@FlorianPerucki FlorianPerucki force-pushed the fperucki/remove-sca-iac branch from 26d393c to 58782e1 Compare January 10, 2025 10:07
@FlorianPerucki
Copy link
Author

Thank you @salome-voltz! In addition to your list I have also removed get_commits_not_in_branch

@sevbch sevbch merged commit cb558e9 into main Jan 13, 2025
31 of 32 checks passed
@sevbch sevbch deleted the fperucki/remove-sca-iac branch January 13, 2025 15:57
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