Skip to content

Commit

Permalink
Prevent arbitrary code execution in wordcloud actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanGin52 committed Oct 17, 2020
1 parent d33114e commit c1363c4
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/wordcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2.3.1

- name: Set env vars
run: |
echo ::set-env name=REPOSITORY::${{ github.repository }}
echo ::set-env name=EVENT_ISSUE_NUMBER::${{ github.event.issue.number }}
echo ::set-env name=EVENT_USER_LOGIN::${{ github.event.issue.user.login }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
Expand All @@ -35,14 +29,19 @@ jobs:
pip install wordcloud
- name: Generate New Word Cloud
env:
REPOSITORY: ${{ github.repository }}
EVENT_ISSUE_NUMBER: ${{ github.event.issue.number }}
EVENT_ISSUE_TITLE: ${{ github.event.issue.title }}
EVENT_USER_LOGIN: ${{ github.event.issue.user.login }}
run: |
ruby <<- EORUBY
require './wordcloud/runner'
Runner.new(
github_token: '${{ secrets.GITHUB_TOKEN }}',
issue_number: ENV.fetch('EVENT_ISSUE_NUMBER'),
issue_title: '${{ github.event.issue.title }}',
issue_title: ENV.fetch('EVENT_ISSUE_TITLE'),
repository: ENV.fetch('REPOSITORY'),
user: ENV.fetch('EVENT_USER_LOGIN'),
).run
Expand Down

0 comments on commit c1363c4

Please sign in to comment.