Skip to content

Conversation

@jocelynlin-wd
Copy link
Contributor

@jocelynlin-wd jocelynlin-wd commented Feb 3, 2026

  • Added a GitHub Actions workflow to check for proprietary paths in pull requests and pushes.
  • Introduced a pre-push hook to prevent pushing files from proprietary paths to the OSS repository.
  • Updated .gitignore to restrict certain application paths and added comments for clarity.

Tested pre-push with following scenarios:

  • extensions/test.txt - Blocked ✅
  • apps/enterprise-app/test.txt - Blocked ✅
  • Normal files - Allowed ✅

…h hooks

- Added a GitHub Actions workflow to check for proprietary paths in pull requests and pushes.
- Introduced a pre-push hook to prevent pushing files from proprietary paths to the OSS repository.
- Updated .gitignore to restrict certain application paths and added comments for clarity.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @jocelynlin-wd, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request establishes robust mechanisms to safeguard against the accidental inclusion of proprietary code within the open-source repository. By integrating both CI/CD checks and local pre-push hooks, it creates a multi-layered defense system designed to enforce strict separation between proprietary and open-source assets, thereby maintaining the integrity and compliance of the OSS project.

Highlights

  • Proprietary Path Guardrails: Implemented a GitHub Actions workflow to automatically check for proprietary paths in pull requests and pushes, ensuring sensitive code does not enter the open-source repository.
  • Pre-push Hook Integration: Introduced a new pre-push Git hook that locally prevents developers from pushing files located in proprietary paths to the OSS repository, providing an immediate feedback loop.
  • .gitignore Updates: Modified the .gitignore file to explicitly ignore directories designated as proprietary, such as 'extensions/' and all 'apps/' directories except for 'apps/oss-app/', enhancing local repository hygiene.
Changelog
  • .gitignore
    • Added a new section for 'Proprietary paths (should never exist in OSS)'.
    • Included 'extensions/' to be ignored.
    • Added 'apps/*/' to be ignored, with an explicit exception for '!apps/oss-app/'.
  • .husky/pre-push
    • Added a new pre-push hook script.
    • The script checks if the push target is the 'FlowiseAI/Flowise' OSS remote.
    • Defined BLOCKED_PATHS (e.g., ^extensions/) and ALLOWED_APPS (^apps/oss-app/).
    • Implemented an is_proprietary function to identify files matching blocked patterns.
    • Logic to determine files to check: for new branches, it checks all files from the merge base; for existing branches, it checks files changed in new commits.
    • If proprietary paths are detected, the push is blocked, and a detailed error message is displayed to the user.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/proprietary-path-guard.yml
Activity
  • The author, jocelynlin-wd, created this pull request to introduce new guardrails for proprietary paths.
  • This PR adds a new pre-push hook and updates the .gitignore file to prevent sensitive code from being pushed to the OSS repository.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces guardrails to prevent proprietary code from being pushed to the open-source repository by updating .gitignore and adding a pre-push hook. The changes are well-structured and the .gitignore update correctly blocks the intended paths. The new pre-push hook is functional, but I've identified an opportunity to significantly improve its performance and simplify the code. My review includes a specific suggestion to replace an inefficient shell loop with a more idiomatic and performant grep pipeline.

jocelynlin-wd and others added 2 commits February 3, 2026 13:40
Limit GITHUB_TOKEN to read-only access for security best practices.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace per-file loop with efficient grep operations.
Removes is_proprietary function in favor of direct pattern matching.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add || true to grep commands to prevent exit code 1 (no match)
from aborting the subshell when husky's set -e is active.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

3 participants