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

Bump brakeman from 6.2.2 to 7.0.0 #1583

Merged
merged 1 commit into from
Jan 2, 2025
Merged

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Dec 31, 2024

Bumps brakeman from 6.2.2 to 7.0.0.

Release notes

Sourced from brakeman's releases.

7.0.0

  • Default to using Prism parser if available (disable with --no-prism)
  • Disable following symbolic links by default (re-enable with --follow-symlinks)
  • Remove updated entry in Brakeman ignore files (Toby Hsieh)
  • Major changes to how rescanning works
  • Fix hardcoded globally excluded paths (#1830)
  • Always warn about deserializing from Marshal
  • Update eval check to be a little noisier
  • Output originalBaseUriIds for SARIF format report (#1889)
  • Add step (and timing) for finding files
  • Fix recursion when handling multiple assignment expressions (#1877)
  • Fix array/hash unknown index handling
  • Update terminal-table version
  • Add CSV library as explicit dependency for Ruby 3.4 support
  • Raise minimum Ruby version to 3.1
Changelog

Sourced from brakeman's changelog.

7.0.0 - 2024-12-30

  • Always warn about deserializing from Marshal
  • Output originalBaseUriIds for SARIF format report
  • Default to using Prism parser if available (disable with --no-prism)
  • Update terminal-table version to use latest
  • Update eval check to be a little noisier
  • Fix array/hash unknown index handling
  • Disable following symbolic links by default, re-enable with --follow-symlinks
  • Add step (and timing) for finding files
  • Add CSV library as explicit dependency for Ruby 3.4 support
  • Major changes to how rescanning works
  • Raise minimum Ruby version to 3.1
  • Fix hardcoded globally excluded paths
  • Remove updated entry in Brakeman ignore files (Toby Hsieh)
  • Fix recursion when handling multiple assignment expressions
Commits
  • 2f2cd21 Relax Prism version for --prism too
  • 76da00a Bump to 7.0.0
  • b0eb1fc Merge pull request #1904 from presidentbeef/relax_prism_version
  • 5ae38b9 Relax Prism version requirement
  • c7018cd Update CHANGES
  • 5f37891 Merge pull request #1902 from presidentbeef/update_deserialize_check
  • d834150 Output originalBaseUriIds for SARIF report (#1890)
  • ee9de40 Use Prism parser by default (#1897)
  • f891743 Always warn about deserializing with Marshal
  • b299ca0 Merge pull request #1899 from presidentbeef/update_eval_check
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [brakeman](https://github.com/presidentbeef/brakeman) from 6.2.2 to 7.0.0.
- [Release notes](https://github.com/presidentbeef/brakeman/releases)
- [Changelog](https://github.com/presidentbeef/brakeman/blob/main/CHANGES.md)
- [Commits](presidentbeef/brakeman@v6.2.2...v7.0.0)

---
updated-dependencies:
- dependency-name: brakeman
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies ruby Pull requests that update Ruby code labels Dec 31, 2024
Copy link

This application is owned by the publishing platform team. Please let us know in #govuk-publishing-platform when you raise any PRs.

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

@brucebolt
Copy link
Member

The Run Brakeman check has silently failed with the following:

Run bundle exec brakeman . --except CheckRenderInline --quiet \
  bundle exec brakeman . --except CheckRenderInline --quiet \
    -o brakeman.json -o brakeman.sarif
  shell: /usr/bin/bash -e {0}
Error: Process completed with exit code [3](https://github.com/alphagov/asset-manager/actions/runs/12556576733/job/35007991814?pr=1583#step:4:3).

I've written a Trello card to investigate.

@brucebolt brucebolt marked this pull request as draft December 31, 2024 09:33
@brucebolt
Copy link
Member

Turns out an exit code of 3 is normal, as brakeman returns a non-zero exit code if a warning is detected during the scan.

The check passed and subsequent steps on the CI process also passed.

I can see the warning was correctly uploaded to GitHub as a code scanning alert: https://github.com/alphagov/asset-manager/security/code-scanning/6.

This therefore seems safe to merge.

brucebolt added a commit to alphagov/govuk-infrastructure that referenced this pull request Jan 2, 2025
Brakeman returns a non-zero status code when there are warnings found or
errors during the scan.

In 9fc187b, we allowed the GitHub
Action to continue on error, so that the warning/error would be uploaded
to GitHub code scanning.

However the non-zero status code still gets written to the GitHub Action
output. This led to confusion in
alphagov/asset-manager#1583 as we thought the
error meant brakeman did not complete properly.

Therefore updating the brakeman configuration to report a zero status
code when a warning or error is found. This means we can remove the
previous change, as any completed run will not return a non-zero status
code. This will also stop the non-zero code causing confusion in the
GitHub Actions output.
brucebolt added a commit to alphagov/govuk-infrastructure that referenced this pull request Jan 2, 2025
Brakeman returns a non-zero status code when there are warnings found or
errors during the scan.

In 9fc187b, we allowed the GitHub
Action to continue on error, so that the warning/error would be uploaded
to GitHub code scanning.

However the non-zero status code still gets written to the GitHub Action
output. This led to confusion in
alphagov/asset-manager#1583 as we thought the
error meant brakeman did not complete properly, when in fact it did but
was only returning that code because a code scanning warning had been
found.

Therefore updating the brakeman configuration to report a zero status
code when a warning or error is found. This means we can remove the
previous change, as any completed run will not return a non-zero status
code. This will also stop the non-zero code causing confusion in the
GitHub Actions output.
@brucebolt brucebolt marked this pull request as ready for review January 2, 2025 15:24
@brucebolt brucebolt merged commit e6c5f18 into main Jan 2, 2025
10 checks passed
@brucebolt brucebolt deleted the dependabot/bundler/brakeman-7.0.0 branch January 2, 2025 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant