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

feat: add review bot #341

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/review-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: review bot
on:
issue_comment:
types: [created, edited]
jobs:
review_comment:
if: contains(github.event.comment.body, '/review-bot ')
runs-on: ubuntu-latest
steps:
- uses: "DamianReeves/write-file-action@master"
with:
path: /tmp/comment.txt
write-mode: overwrite
contents: ${{ github.event.comment.body }}
- uses: jc-lab/shim-review-bot@v0.0.8
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A bit nitpick, but in the context of a security review I'd suggest pinning on to a - arguably less readable - commit id.
This is to ensure nobody would rewrite the tag on the - external - action repository and sneak in an altered/deceptive review.

I guess same issue with the write-file-action and swap branch name to a commit id.

with:
comment-file: /tmp/comment.txt
issue-repository: ${{ github.repository }}
issue-number: ${{ github.event.issue.number }}
source: ${{ inputs.source }}
build-script: ${{ inputs.build-script }}
output-file: ${{ inputs.output-file }}
vendor-cert: ${{ inputs.vendor-cert }}
report-output: ${{ inputs.report-output }}


# ISSUE MESSAGE FORMAT
# ==================================================
# /review-bot SOURCE
# ``` (it is optional. yaml-format)
# parameters
# ```
# ==================================================

# ISSUE MESSAGE SAMPLE
# ==================================================
# /review-bot https://github.com/jc-lab/shim-review-bot/tree/master/sample-repo
# ```
# build-script: build.sh
# output-file: output.tar
# vendor-cert: vendor_cert.der
# sbat: sbat.csv
# ```
# ==================================================