Skip to content

Update spamcheck to v0.3.2

Ryan Egesdahl requested to merge spamcheck-go-1.21 into master

What does this MR do?

This MR updates the current go version of Spamcheck to v0.3.2, which has been patched for compatibility with Go 1.21.

Related issues

Related to: https://gitlab.com/gitlab-org/gl-security/security-engineering/security-automation/spam/spamcheck/-/issues/2

Checklist

See Definition of done.

For anything in this list which will not be completed, please provide a reason in the MR discussion.

Required

  • MR title and description are up to date, accurate, and descriptive.
  • MR targeting the appropriate branch.
  • Latest Merge Result pipeline is green.
  • When ready for review, MR is labeled "~workflow::ready for review" per the Distribution MR workflow.

For GitLab team members

If you don't have access to this, the reviewer should trigger these jobs for you during the review process.

  • The manual Trigger:ee-package jobs have a green pipeline running against latest commit.
  • If config/software or config/patches directories are changed, make sure the build-package-on-all-os job within the Trigger:ee-package downstream pipeline succeeded.
  • If you are changing anything SSL related, then the Trigger:package:fips manual job within the Trigger:ee-package downstream pipeline must succeed.
  • If CI configuration is changed, the branch must be pushed to dev.gitlab.org to confirm regular branch builds aren't broken.

Test Plan

GitLab EE with Go 1.20.12

  • Verify GitLab installs successfully and without errors
  • Verify the installed version of SpamCheck is 0.3.2 with grep spamcheck /opt/gitlab/version-manifest.txt
  • Enable SpamCheck in /etc/gitlab/gitlab.rb: spamcheck['enable'] = true
  • Verify sudo gitlab-ctl reconfigure finishes without errors
  • Verify spamcheck and spam-classifier are up and running with sudo gitlab-ctl status | grep spam
  • Test and SpamCheck operation according to this procedure
  • Verify spamcheck logs have no errors with sudo gitlab-ctl tail spamcheck
  • Log into the instance as root
  • Configure SpamCheck in GitLab UI according to the documentation
  • Create a public test project named testproject
  • Create a test user named testuser with email testuser@example.com and no password
  • Impersonate testuser
  • Attempt to create an issue on root/testproject with title and description fifa xxx porn stream fifa xxx porn stream
  • Verify the following error message is received: Your issue has been recognized as spam. Please, change the content to proceed.
  • Click the HomePage button and verify no errors are displayed
  • Stop impersonating testuser and assign a password to the account
  • Log out as root and log in as testuser
  • Attempt to create an issue on root/testproject with title and description fifa xxx porn stream fifa xxx porn stream
  • Verify the following error message is received: Your issue has been recognized as spam. Please, change the content to proceed.
  • Click the HomePage button and verify no errors are displayed

GitLab EE with Go 1.21.6

  • Verify GitLab installs successfully and without errors
  • Verify the installed version of SpamCheck is 0.3.2 with grep spamcheck /opt/gitlab/version-manifest.txt
  • Enable SpamCheck in /etc/gitlab/gitlab.rb: spamcheck['enable'] = true
  • Verify sudo gitlab-ctl reconfigure finishes without errors
  • Verify spamcheck and spam-classifier are up and running with sudo gitlab-ctl status | grep spam
  • Test and SpamCheck operation according to this procedure
  • Verify spamcheck logs have no errors with sudo gitlab-ctl tail spamcheck
  • Log into the instance as root
  • Configure SpamCheck in GitLab UI according to the documentation
  • Create a public test project named testproject
  • Create a test user named testuser with email testuser@example.com and no password
  • Impersonate testuser
  • Attempt to create an issue on root/testproject with title and description fifa xxx porn stream fifa xxx porn stream
  • Verify the following error message is received: Your issue has been recognized as spam. Please, change the content to proceed.
  • Click the HomePage button and verify no errors are displayed
  • Stop impersonating testuser and assign a password to the account
  • Log out as root and log in as testuser
  • Attempt to create an issue on root/testproject with title and description fifa xxx porn stream fifa xxx porn stream
  • Verify the following error message is received: Your issue has been recognized as spam. Please, change the content to proceed.
  • Click the HomePage button and verify no errors are displayed

Expected (please provide an explanation if not completing)

  • Test plan indicating conditions for success has been posted and passes.
  • Documentation created/updated.
  • Tests added.
  • Integration tests added to GitLab QA.
  • Equivalent MR/issue for the GitLab Chart opened.
  • Validate potential values for new configuration settings. Formats such as integer 10, duration 10s, URI scheme://user:passwd@host:port may require quotation or other special handling when rendered in a template and written to a configuration file.
Edited by Ryan Egesdahl

Merge request reports