Skip to content

feat: add Antigravity plugin and Firestore security rules subagent - #172

Open
christhompsongoogle wants to merge 6 commits into
mainfrom
antigravity-plugin
Open

feat: add Antigravity plugin and Firestore security rules subagent#172
christhompsongoogle wants to merge 6 commits into
mainfrom
antigravity-plugin

Conversation

@christhompsongoogle

Copy link
Copy Markdown
Collaborator

No description provided.

@google-cla

google-cla Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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

Copy link
Copy Markdown
Contributor

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 the official Firebase plugin for Antigravity, adding configuration files (plugin.json, mcp_config.json), updating the README.md with installation options, and defining a specialized firestore-rules-author subagent. The review feedback highlights a path mismatch in plugin.json for the MCP server configuration, an invalid type check (is number) in the Firestore security rules guidelines, and a potential runtime evaluation error in the isDocOwner helper function when resource is null during document creation.

Comment thread plugin.json Outdated
],
"skills": "./skills/",
"agents": "./agents/",
"mcpServers": "./.mcp.json",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

There is a mismatch between the MCP server configuration file name. The file added in this pull request is named mcp_config.json, but plugin.json references ./.mcp.json. Updating this reference ensures the Antigravity plugin loader can locate the MCP configuration.

Suggested change
"mcpServers": "./.mcp.json",
"mcpServers": "./mcp_config.json",

- Every list/array field must have size bounds:
- `data.tags is list && data.tags.size() <= 20`
- Number fields must have realistic boundaries:
- `data.price is number && data.price >= 0 && data.price <= 1000000`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

In Cloud Firestore Security Rules, number is not a valid type for the is operator. To check if a value is a number, you must check if it is either an int or a float.


- Validate all fields against explicit CEL types:
- `data.title is string`
- `data.count is int` or `data.price is number`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

In Cloud Firestore Security Rules, number is not a valid type for the is operator. To check if a value is a number, you must check if it is either an int or a float.

}

function isPositive(field) {
return request.resource.data[field] is number && request.resource.data[field] > 0;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

In Cloud Firestore Security Rules, number is not a valid type for the is operator. To check if a value is a number, you must check if it is either an int or a float.

Suggested change
return request.resource.data[field] is number && request.resource.data[field] > 0;
return (request.resource.data[field] is int || request.resource.data[field] is float) && request.resource.data[field] > 0;

}

function isDocOwner() {
return isAuthenticated() && request.auth.uid == resource.data.uid;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

During a create operation, the resource object is null because the document does not exist yet. Accessing resource.data directly will throw an evaluation error and cause the rule to fail. Adding a null check for resource ensures defensive and robust rule evaluation.

Suggested change
return isAuthenticated() && request.auth.uid == resource.data.uid;
return isAuthenticated() && resource != null && request.auth.uid == resource.data.uid;

@christhompsongoogle
christhompsongoogle marked this pull request as ready for review September 2, 2026 22:51
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.

1 participant