Skip to content

Conversation

@aaguiarz
Copy link
Member

@aaguiarz aaguiarz commented Aug 9, 2025

Description

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Chores
    • Introduced an automated workflow to run supply-chain security analysis on the repository and upload results to GitHub's code scanning dashboard.

@aaguiarz aaguiarz requested a review from a team as a code owner August 9, 2025 20:06
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 9, 2025

Walkthrough

A new GitHub Actions workflow file, .github/workflows/scorecard.yml, has been added. This workflow automates the execution of OSSF Scorecard supply-chain security analysis on the repository, running on branch protection rule changes, weekly schedules, and pushes to the main branch. It uploads results to GitHub's code scanning dashboard.

Changes

Cohort / File(s) Change Summary
New Scorecard Security Workflow
.github/workflows/scorecard.yml
Introduces a GitHub Actions workflow to run OSSF Scorecard analysis, upload SARIF results, and integrate with code scanning.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Note

🔌 MCP (Model Context Protocol) integration is now available in Early Access!

Pro users can now connect to remote MCP servers under the Integrations page to get reviews and chat conversations that understand additional development context.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch aaguiarz-patch-1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@codecov-commenter
Copy link

codecov-commenter commented Aug 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 34.58%. Comparing base (17c34db) to head (f02f1cc).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #199   +/-   ##
=========================================
  Coverage     34.58%   34.58%           
  Complexity     1043     1043           
=========================================
  Files           185      185           
  Lines          6980     6980           
  Branches        790      790           
=========================================
  Hits           2414     2414           
  Misses         4463     4463           
  Partials        103      103           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🔭 Outside diff range comments (1)
.github/workflows/scorecard.yml (1)

73-79: Upgrade SARIF upload to CodeQL v3 and pin to a fixed commit SHA

Pin the upload-sarif step to the v3.29.8 commit for stronger supply-chain guarantees:

• File: .github/workflows/scorecard.yml (lines 73–79)

     - name: "Upload to code-scanning"
-        uses: github/codeql-action/upload-sarif@7273f08caa1dcf2c2837f362f1982de0ab4dc344 # v2.22.3
+        uses: github/codeql-action/upload-sarif@46e53ea9b4aaece2ca70cd810d8e14b38b876f6f # v3.29.8
       with:
         sarif_file: results.sarif

This switches you onto the current v3 series and pins to commit 46e53ea9b4aaece2ca70cd810d8e14b38b876f6f.

🧹 Nitpick comments (2)
.github/workflows/scorecard.yml (2)

17-23: Add workflow-level concurrency and a job timeout to avoid overlaps and hangs

Prevent overlapping scheduled runs and ensure jobs don’t hang indefinitely.

 permissions: read-all
+
+# Prevent overlapping runs of this workflow across refs
+concurrency:
+  group: scorecard-${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
 jobs:
   analysis:
     name: Scorecard analysis
     runs-on: ubuntu-latest
+    timeout-minutes: 15

41-46: Make uploads resilient by gating on analysis outcome; add step id

Ensure artifacts and code scanning uploads still run appropriately and only when results exist.

-      - name: "Run analysis"
+      - name: "Run analysis"
+        id: scorecard
         uses: ossf/scorecard-action@f49aabe0b5af0936a0987cfb85d86b75731b0186 # v2.4.1
         with:
           results_file: results.sarif
           results_format: sarif
           ...
 
       - name: "Upload artifact"
+        if: ${{ always() && steps.scorecard.outcome == 'success' }}
         uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
         with:
           name: SARIF file
           path: results.sarif
           retention-days: 5
 
       - name: "Upload to code-scanning"
+        if: ${{ always() && steps.scorecard.outcome == 'success' }}
         uses: github/codeql-action/upload-sarif@7273f08caa1dcf2c2837f362f1982de0ab4dc344 #v2.22.3
         with:
           sarif_file: results.sarif

Also applies to: 64-79

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 17c34db and f02f1cc.

📒 Files selected for processing (1)
  • .github/workflows/scorecard.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
  • GitHub Check: Test and Build OpenFGA (17)
  • GitHub Check: Test and Build OpenFGA (21)
  • GitHub Check: Test and Build OpenFGA (11)
  • GitHub Check: Analyze (java)
  • GitHub Check: Test and Build OpenFGA (11)
🔇 Additional comments (2)
.github/workflows/scorecard.yml (2)

35-46: Good: third-party actions are pinned by commit SHA and checkout is hardened

  • Pinned SHAs for actions/checkout and ossf/scorecard-action are spot on.
  • persist-credentials: false is a good hardening measure.

14-15: Default branch verified as “main”
The repository’s default branch is confirmed to be main. No updates to the workflow are needed.

@aaguiarz aaguiarz enabled auto-merge August 13, 2025 18:02
@aaguiarz aaguiarz added this pull request to the merge queue Aug 13, 2025
Merged via the queue into main with commit 3491b03 Aug 13, 2025
24 checks passed
@aaguiarz aaguiarz deleted the aaguiarz-patch-1 branch August 13, 2025 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants