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

using ai-codewise int for dogfooding #2130

Merged
merged 2 commits into from
May 15, 2023
Merged
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
20 changes: 8 additions & 12 deletions .github/workflows/code-review.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,23 @@
name: Code Review
on:
pull_request:
branches:
- main
- int
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • [Low]Consolidate branch filter
    The 'branches' filter can be consolidated into a single line using a list. Consolidate the 'branches' filter into a single line

permissions:
contents: read

jobs:
code-review:
name: Code Review
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
id-token: write
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • [Medium]Remove unused permissions
    The 'id-token' permission is not used and can be removed. Remove the 'id-token' permission

pull-requests: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@6b3083af2869dc3314a0257a42f4af696cc79ba3 # v2.3.1
uses: step-security/harden-runner@128a63446a954579617e875aaab7d2978154e969 # v2.4.0
with:
egress-policy: audit
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • [High]Address potential security vulnerabilities
    The hardened runner step could be improved to block outgoing traffic instead of auditing it, and allowlist only specific endpoints. Update the egress-policy to 'block' and specify allowed endpoints using 'allowed-endpoints'

disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.github.com:443
int.api.stepsecurity.io:443

- name: Code Review
uses: docker://ghcr.io/step-security/code-reviewer/int:latest
env:
PAT: ${{ secrets.GITHUB_TOKEN }}
uses: step-security/ai-codewise@int