Skip to content

Commit

Permalink
Update run service and dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bermannoah committed Mar 25, 2022
1 parent 7b5711d commit 8ac6bfe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM ruby:2.7.5-alpine

RUN gem install brakeman
RUN gem install brakeman -v 5.2.1

COPY lib /action/lib

Expand Down
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
## Brakeman github action
## Brakeman results parser github action

Brakeman is a static analysis tool which checks Ruby on Rails applications for security vulnerabilities.
[See more](https://github.com/presidentbeef/brakeman)

You can read more about Brakeman itself [here](https://github.com/presidentbeef/brakeman).

This action helps make sure that brakeman results get accurately added to pull requests, in the event of a new issue.

Currently we hardcode the brakeman version (5.2.1) to prevent the unintended consequences of pulling down the latest version
regardless of context.

### Usage

```yml
- name: Brakeman
uses: cookpad/[email protected].1
uses: cookpad/[email protected].2
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
```
Expand All @@ -22,7 +28,7 @@ Brakeman is a static analysis tool which checks Ruby on Rails applications for s
run: |
brakeman -f json > tmp/brakeman.json || exit 0
- name: Brakeman
uses: cookpad/[email protected].1
uses: cookpad/[email protected].2
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
REPORT_PATH: tmp/brakeman.json
Expand All @@ -32,7 +38,7 @@ Brakeman is a static analysis tool which checks Ruby on Rails applications for s
```yml
- name: Brakeman
uses: cookpad/[email protected].1
uses: cookpad/[email protected].2
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
PROJECT_PATH: my_rails_app
Expand All @@ -51,7 +57,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Brakeman
uses: cookpad/[email protected].1
uses: cookpad/[email protected].2
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
```
Expand Down
3 changes: 1 addition & 2 deletions lib/github_check_run_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ def run
@annotations = @report_adapter.annotations(@report)
@conclusion = @report_adapter.conslusion(@report)

pp '$' * 20
pp '%' * 20
puts @summary

result = {}
@annotations.each_slice(MAX_ANNOTATIONS_SIZE) do |annotations|
Expand Down

0 comments on commit 8ac6bfe

Please sign in to comment.