forked from milkfarmproductions/devise_masquerade
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
174 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# This workflow integrates Brakeman with GitHub's Code Scanning feature | ||
# Brakeman is a static analysis security vulnerability scanner for Ruby on Rails applications | ||
|
||
name: Brakeman Scan | ||
|
||
# This section configures the trigger for the workflow. Feel free to customize depending on your convention | ||
on: | ||
push: | ||
branches: [ "master", "main" ] | ||
pull_request: | ||
branches: [ "master", "main" ] | ||
|
||
jobs: | ||
brakeman-scan: | ||
name: Brakeman Scan | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Checkout the repository to the GitHub Actions runner | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
# Customize the ruby version depending on your needs | ||
- name: Setup Ruby | ||
uses: actions/setup-ruby@v1 | ||
with: | ||
ruby-version: '2.7' | ||
|
||
- name: Setup Brakeman | ||
env: | ||
BRAKEMAN_VERSION: '4.10' # SARIF support is provided in Brakeman version 4.10+ | ||
run: | | ||
gem install brakeman --version $BRAKEMAN_VERSION | ||
# Execute Brakeman CLI and generate a SARIF output with the security issues identified during the analysis | ||
- name: Scan | ||
continue-on-error: true | ||
run: | | ||
brakeman -f sarif -o output.sarif.json . | ||
# Upload the SARIF file generated in the previous step | ||
- name: Upload SARIF | ||
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
sarif_file: output.sarif.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: "Rubocop" | ||
|
||
on: push | ||
|
||
jobs: | ||
rubocop: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
# If running on a self-hosted runner, check it meets the requirements | ||
# listed at https://github.com/ruby/setup-ruby#using-self-hosted-runners | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
|
||
# This step is not necessary if you add the gem to your Gemfile | ||
- name: Install Code Scanning integration | ||
run: bundle add code-scanning-rubocop --version 0.3.0 --skip-install | ||
|
||
- name: Install dependencies | ||
run: bundle install | ||
|
||
- name: Rubocop run | ||
run: | | ||
bash -c " | ||
bundle exec rubocop --require code_scanning --format CodeScanning::SarifFormatter -o rubocop.sarif | ||
[[ $? -ne 2 ]] | ||
" | ||
- name: Upload Sarif output | ||
uses: github/codeql-action/upload-sarif@v1 | ||
with: | ||
sarif_file: rubocop.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.6.5 | ||
2.7.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ language: ruby | |
rvm: | ||
- 2.5.1 | ||
- 2.6.0 | ||
- 2.7.2 | ||
gemfile: | ||
- Gemfile | ||
script: time ./script/travis.sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,4 +36,6 @@ group :test do | |
gem 'selenium-webdriver' | ||
gem 'chromedriver-helper' | ||
gem 'launchy' | ||
|
||
gem "nokogiri", ">= 1.10.8" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Then("I should see maquerade url") do | ||
page.html.should include('href="/users/masquerade?masquerade=') | ||
end | ||
|
||
When("I am on the users page with extra params") do | ||
visit '/extra_params' | ||
end | ||
|
||
Then("I should see maquerade url with extra params") do | ||
page.html.should include('href="/users/masquerade?key1=value1&masquerade=') | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Feature: Use masquerade path to generate routes on page | ||
In order to have the way to render masquerade path | ||
As an user | ||
I want to be able to see the url and use it | ||
|
||
Scenario: Use masquerade path helper | ||
Given I logged in | ||
And I have a user for masquerade | ||
|
||
When I am on the users page | ||
Then I should see maquerade url | ||
|
||
When I am on the users page with extra params | ||
Then I should see maquerade url with extra params |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module DeviseMasquerade | ||
VERSION = '1.2.0'.freeze | ||
VERSION = '1.3.1'.freeze | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.