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

Add security cops from gitlab-styles #11

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

baelter
Copy link
Member

@baelter baelter commented Nov 7, 2024

WHY are these changes introduced?

We use rubocop-gitlab-security that is deprecated. gitlab-styles superseeds it but we don't want that dependency since it will control which rubocop version we can use.

WHAT is this pull request doing?

Copying cops we want for gitlab-styles into this gem.

HOW can this pull request be tested?

Specs

@baelter
Copy link
Member Author

baelter commented Nov 7, 2024

Could not get all specs to pass. Timeboxing for now. Will return in the future if no one beats me to it.

@walro
Copy link
Contributor

walro commented Nov 11, 2024

Can try to take look here if you are swamped :)

@baelter
Copy link
Member Author

baelter commented Nov 11, 2024

See if you understand why the specs fail, don't spend a lot of time on it though.

@walro
Copy link
Contributor

walro commented Nov 11, 2024

Yeah, failed in my timebox too. I tested with Ruby 3.1 and 3.2 and tried to mimic their version constraints. Also checked spec_helper if there was something that we were missing. Looked briefly at issues and history for gitlab-styles without spotting anything apparent. Also noted that the only two cops that don't pass are the "legacy ones" from rubocop-gitlab-security (PublicSend and JsonSerialization), the newer specs seem to pass. Didn't have time to dig into details there.

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