Skip to content

Commit

Permalink
updated github flow
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Jul 25, 2023
1 parent edf3c6d commit 86563dc
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 33 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/brakeman-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Brakeman Scan
on:
- pull_request:
- schedule:
- cron: "0 0 * * *"

jobs:
base:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Install brakeman
run: gem install brakeman
- name: Static code analyses for security
run: brakeman
25 changes: 25 additions & 0 deletions .github/workflows/bundle-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Bundle Audit
on:
pull_request:
schedule:
- cron: "0 0 * * *"
jobs:
base:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
bundler-cache: true
- name: Install bundler-audit
run: gem install bundler-audit
- name: Check dependencies with known vulnerabilities
run: bundle-audit --update
- name: Check javascript dependencies
run: yarn audit
33 changes: 0 additions & 33 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,6 @@ name: Github Testing
on: [push]

jobs:
bundle_audit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.0
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: config bundler
run: |
bundle config set without 'development staging production'
bundle config set deployment '[secure]'
bundle env
head -n1 $(which bundle)
- name: Bundle Audit Check
run: bundle exec bundle-audit check --update

brakeman:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.0
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: config bundler
run: |
bundle config set without 'development staging production'
bundle config set deployment '[secure]'
bundle env
head -n1 $(which bundle)
- name: Run Brakeman
run: bundle exec brakeman --quiet --skip-libs --exit-on-warn --ignore-config=.brakeman-ignore
test:
services:
postgres:
Expand Down

0 comments on commit 86563dc

Please sign in to comment.