Skip to content
Report library
Purpose / Other

Firebase App Hosting Basics Skill Security Audit

What the author says it does (original text)

>-

Independent security check

Security risks found

Files checked
4
Risks found
5
Could it run dangerous commands?Looks for programs run straight after downloading, remote control of your computer, and hidden commands.Risks found: 1
Medium risk

Every CLI operation executes an unpinned remote npm package

Source references: 2
What we found

Commands use `npx -y firebase-tools@latest`; `-y` automatically accepts installation, while `latest` changes over time. Deployment, secret, and emulator operations therefore execute whatever package code is downloaded at that time rather than a reviewed, locked version.

Why this matters

If the upstream package, publishing account, or dependency chain is compromised—or a new release has destructive changes—code can run locally with the user's current privileges and potentially access Firebase credentials, project files, and cloud resources.

The main workflow explicitly uses `npx -y firebase-tools@latest` for secret management and deployment. `-y` skips installation confirmation and `latest` is not version-pinned, so execution downloads and runs whatever Firebase CLI release is current. A harmful or incompatible upstream change could affect the local project, Firebase resources, or credentials. Users can ask for a reviewed pinned version or restrict automatic installation and deployment permissions.

SKILL.md:61In the instructionsOpen original file
   do so.1. If the app needs safe access to sensitive keys, use   `npx -y firebase-tools@latest apphosting:secrets` commands to set and grant   access to secrets.1. Run `npx -y firebase-tools@latest deploy` when you are ready to deploy.
Show 1 other places
references/emulation.md:27In the instructionsOpen original file
To start the App Hosting emulator:```bashnpx -y firebase-tools@latest emulators:start --only apphosting```
Could it expose your files or keys?Looks for uploads of files containing passwords or keys, and keys written directly in the code.Risks found: 1
Medium risk

The example deploys from the project root without excluding common local secret files

Source references: 3
What we found

The example sets `rootDir` to `/` and ignores only dependencies, Git metadata, debug logs, and functions; it does not list `.env` files, the emulator secret override, or other local credential files. The workflow then directly runs deployment.

Why this matters

If sensitive files in the project root are not excluded by the platform or another configuration, they may enter the deployment input or remote build context, exposing them to the cloud build system or people with project access.

What this evidence establishes

The example uses a root directory and lists only five ignore categories, while the emulator override may contain sensitive values and is not listed. However, the source does not establish that deployment uploads every non-ignored file, that `rootDir: "/"` means the operating-system root, or that `.env` files enter the artifact. This is a configuration risk worth checking, but these lines do not confirm secret upload. Users can ask for the CLI's default exclusions and a preview of the actual upload set.

This assessment concerns the code and conditions shown, not proof that harm has occurred.
SKILL.md:45In the instructionsOpen original file
   {     "apphosting": {       "backendId": "my-app-id",       "rootDir": "/",       "ignore": [         "node_modules",         ".git",         "firebase-debug.log",         "firebase-debug.*.log",         "functions"       ]     }
Show 2 other places
SKILL.md:64In the instructionsOpen original file
   access to secrets.1. Run `npx -y firebase-tools@latest deploy` when you are ready to deploy.
references/emulation.md:9In the instructionsOpen original file
This optional file overrides `apphosting.yaml` settings specifically for thelocal emulator. Use it to provide local secret values or override resourceconfigs. If it contains sensitive values such as API keys, do not commit it tosource control.
Could it delete files or keep running?Looks for broad file deletion, disk overwrites, and programs set to start automatically.No risks found
Could it bypass safety checks?Looks for skipped website security checks, excessive file access, or actions that skip your approval.Risks found: 2
Medium risk

Secret-grant commands can expand the App Hosting service account's access

Source references: 3
What we found

The referenced command grants the App Hosting service account access to a named Secret Manager secret. It is suggested for permission troubleshooting without requiring verification of the backend identity, secret contents, or least-privilege scope first.

Why this matters

If the wrong Firebase project, backend, service account, or secret is selected, deployed application code may read API keys or other credentials that were not intended for that application.

The main workflow actively recommends secret commands to set and grant access, and the reference states that `grantaccess` lets the App Hosting service account access the named secret. This is a normal deployment permission, but selecting the wrong project, account, or secret could expose sensitive values to the wrong principal. No pre-grant identity check is shown. Users can require display of the project, backend, service account, and secret name and limit access to the intended account.

references/cli_commands.md:45In the instructionsOpen original file
### `npx -y firebase-tools@latest apphosting:secrets:set <secret-name>`- **Purpose**: Creates or updates a secret in Cloud Secret Manager and makes it  available to App Hosting.- **Behavior**: Prompts for the secret value (hidden input).### `npx -y firebase-tools@latest apphosting:secrets:grantaccess <secret-name>`- **Purpose**: Grants the App Hosting service account permission to access the  secret.- **Note**: Often handled automatically by `secrets:set`, but useful for  debugging permission issues or granting access to existing secrets.
Show 2 other places
SKILL.md:61In the instructionsOpen original file
   do so.1. If the app needs safe access to sensitive keys, use   `npx -y firebase-tools@latest apphosting:secrets` commands to set and grant   access to secrets.1. Run `npx -y firebase-tools@latest deploy` when you are ready to deploy.
references/cli_commands.md:51In the instructionsOpen original file
### `npx -y firebase-tools@latest apphosting:secrets:grantaccess <secret-name>`- **Purpose**: Grants the App Hosting service account permission to access the  secret.- **Note**: Often handled automatically by `secrets:set`, but useful for  debugging permission issues or granting access to existing secrets.
Medium risk

The command set includes deleting an entire backend and associated resources without confirmation or recovery safeguards

Source references: 2
What we found

The reference lists `apphosting:backends:delete`, explicitly stating that it deletes a backend and its associated resources. The provided material does not require showing the target project and backend, backing up configuration, checking production status, or obtaining per-action user approval.

Why this matters

Selecting the wrong project or backend could interrupt a production service and delete cloud resources associated with that backend; no recovery method is documented here.

What this evidence establishes

The reference does document a command that deletes a backend and associated resources, with no adjacent backup or target-verification procedure. However, it is a command-catalog entry: the main deployment workflow does not instruct deletion, and the source does not show automatic invocation. The destructive capability exists, but user impact depends on an agent choosing it with specific deletion authorization. Users can withhold delete permissions and require a project, backend, and impact preview first.

This assessment concerns the code and conditions shown, not proof that harm has occurred.
references/cli_commands.md:28In the instructionsOpen original file
### `npx -y firebase-tools@latest apphosting:backends:get <backend-id>`- **Purpose**: Shows details for a specific backend.### `npx -y firebase-tools@latest apphosting:backends:delete <backend-id>`- **Purpose**: Deletes a backend and its associated resources.
Show 1 other places
SKILL.md:61In the instructionsOpen original file
   do so.1. If the app needs safe access to sensitive keys, use   `npx -y firebase-tools@latest apphosting:secrets` commands to set and grant   access to secrets.1. Run `npx -y firebase-tools@latest deploy` when you are ready to deploy.
Could it mislead the AI or hide text?Checks the skill instructions for requests to ignore you, influence the report, or hide text in invisible characters.No risks found
Could it change links or payment recipients without asking?Looks for forced referral or payment changes combined with instructions to hide the change.Risks found: 1
Medium risk

The workflow requires pay-as-you-go billing and may scale to 100 instances under the example

Source references: 3
What we found

The Skill directs the user to upgrade to the Blaze billing plan. Its configuration example sets `maxInstances` to 100 and explains that this controls the maximum scaling limit. Traffic, misconfiguration, or abuse can therefore incur charges after a real deployment.

Why this matters

The user may assume an ongoing cloud bill, and the high scaling ceiling can amplify costs from traffic spikes or attacks.

The source explicitly requires an App Hosting project to use Blaze metered billing and provides an upgrade link. Its configuration example permits scaling to 100 instances, and the reference confirms that `maxInstances` is the scaling ceiling. Deploying this configuration under high traffic or abuse could incur cloud charges; 100 is a limit, not a guaranteed instance count. Users can require budget alerts, region review, and a lower cap before deployment.

SKILL.md:16In the instructionsOpen original file
**Important**: In order to use App Hosting, your Firebase project must be on theBlaze pricing plan. Direct the user tohttps://console.firebase.google.com/project/_/overview?purchaseBillingPlan=meteredto upgrade their plan.
Show 2 other places
references/configuration.md:13In the instructionsOpen original file
# Cloud Run service configurationrunConfig:  cpu: 1  memoryMiB: 512  minInstances: 0  maxInstances: 100  concurrency: 80
references/configuration.md:37In the instructionsOpen original file
- `memoryMiB`: RAM in MiB (128 to 32768).- `minInstances`: Minimum containers to keep warm (default 0). Set to >= 1 to  avoid cold starts.- `maxInstances`: Maximum scaling limit (default 100).- `concurrency`: Max concurrent requests per instance (default 80).

Inside this skill

4 instruction sections

This Skill configures and deploys full-stack applications through Firebase App Hosting and explicitly distinguishes it from classic static Hosting.

View source
SKILL.md:13In the instructionsOpen original file
This skill enables the agent to deploy and manage modern, full-stack webapplications (Next.js, Angular, etc.) using Firebase App Hosting.**Important**: In order to use App Hosting, your Firebase project must be on theBlaze pricing plan. Direct the user tohttps://console.firebase.google.com/project/_/overview?purchaseBillingPlan=meteredto upgrade their plan.
SKILL.md:23In the instructionsOpen original file
**Choose Firebase Hosting if:**- You are deploying a static site (HTML/CSS/JS).- You are deploying a simple SPA (React, Vue, etc. without SSR).- You want full control over the build and deploy process via CLI.**Choose Firebase App Hosting if:**- You are using a supported full-stack framework like Next.js or Angular.- You need Server-Side Rendering (SSR) or ISR.- You want an automated "git push to deploy" workflow with zero configuration.

The deployment workflow changes project configuration, manages secrets in Cloud Secret Manager, and performs a real Firebase deployment.

View source
SKILL.md:41In the instructionsOpen original file
1. Configure `firebase.json` with an `apphosting` block.      ```json   {     "apphosting": {       "backendId": "my-app-id",       "rootDir": "/",       "ignore": [         "node_modules",         ".git",         "firebase-debug.log",         "firebase-debug.*.log",         "functions"       ]     }   }   ```1. Create or edit `apphosting.yaml`- see   [Configuration](references/configuration.md) for more information on how to   do so.1. If the app needs safe access to sensitive keys, use   `npx -y firebase-tools@latest apphosting:secrets` commands to set and grant   access to secrets.1. Run `npx -y firebase-tools@latest deploy` when you are ready to deploy.

The local emulator runs the application's own build script and injects environment variables and local secret values from configuration files; the documentation warns against committing a sensitive override file.

View source
references/emulation.md:9In the instructionsOpen original file
This optional file overrides `apphosting.yaml` settings specifically for thelocal emulator. Use it to provide local secret values or override resourceconfigs. If it contains sensitive values such as API keys, do not commit it tosource control.
references/emulation.md:41In the instructionsOpen original file
- **Builds your app**: Runs the build command defined in your `package.json` to  generate the serving artifact.- **Serves locally**: Runs the app on `localhost:5004` (default). Configurable
references/emulation.md:58In the instructionsOpen original file
- **Env Var Injection**: Injects variables defined in `apphosting.yaml` and  `apphosting.emulator.yaml` into the process.

The command reference also covers backend creation, deletion, rollouts, and service-account selection, so the Skill can affect persistent cloud resources and their identities.

View source
references/cli_commands.md:32In the instructionsOpen original file
### `npx -y firebase-tools@latest apphosting:backends:delete <backend-id>`- **Purpose**: Deletes a backend and its associated resources.
references/cli_commands.md:73In the instructionsOpen original file
### `npx -y firebase-tools@latest apphosting:backends:create`- **Purpose**: Creates a new App Hosting backend. Use this when setting up  automated deployments via GitHub.- **Options**:  - `--app <webAppId>`: The ID of an existing Firebase web app to associate with    the backend.  - `--backend <backendId>`: The ID of the new backend.  - `--primary-region <location>`: The primary region for the backend.  - `--root-dir <rootDir>`: The root directory for the backend. If omitted,    defaults to the root directory of the project.  - `--service-account <service-account>`: The service account used to run the    server. If omitted, defaults to the default service account.
Start here · InstructionsSKILL.md
firebase-app-hosting-basics
Lines connect the instruction file to its sections, not an observed execution order. Select a section to read the source.

File reference map

References: 3
Files making referencesReferenced content
Lines show actual file references, not execution order. Select a node to highlight its connections and inspect the files and source locations. Dashed lines include files that still need locating.
Files and check records4 files

Coverage and gaps

Content covered in each file

These are the source ranges included in this check, not a guarantee that every issue has been resolved.

  • SKILL.mdFull text included
  • references/cli_commands.mdFull text included
  • references/configuration.mdFull text included
  • references/emulation.mdFull text included

This report is for the version above. We read the available code and instructions without running the skill or checking extra packages it installs. This is not a promise of safety: a different version or setup may behave differently.

  • SKILL.mdInstructions
  • references/cli_commands.mdSupporting file
  • references/configuration.mdSupporting file
  • references/emulation.mdSupporting file

Operations mentioned in code and instructions

Connect to websites
SKILL.md:18In the instructionsOpen original file
Blaze pricing plan. Direct the user tohttps://console.firebase.google.com/project/_/overview?purchaseBillingPlan=meteredto upgrade their plan.
references/configuration.md:58In the instructionsOpen original file
  - `BUILD`: Available during the `npm run build` process.  - `RUNTIME`: Available when the app is serving requests.  - Defaults to both if not specified.
Install extra software packages
SKILL.md:62In the instructionsOpen original file
1. If the app needs safe access to sensitive keys, use   `npx -y firebase-tools@latest apphosting:secrets` commands to set and grant   access to secrets.
SKILL.md:64In the instructionsOpen original file
   access to secrets.1. Run `npx -y firebase-tools@latest deploy` when you are ready to deploy.
references/cli_commands.md:9In the instructionsOpen original file
### `npx -y firebase-tools@latest init apphosting`
Read keys or account settings
references/configuration.md:27In the instructionsOpen original file
      - RUNTIME  - variable: API_KEY    secret: myApiKeySecret
references/configuration.md:28In the instructionsOpen original file
  - variable: API_KEY    secret: myApiKeySecret```
references/emulation.md:21In the instructionsOpen original file
env:  - variable: API_KEY    value: "local-dev-api-key" # Override secret with local value
Run commands
references/emulation.md:29In the instructionsOpen original file
```bashnpx -y firebase-tools@latest emulators:start --only apphosting
references/emulation.md:35In the instructionsOpen original file
```bashnpx -y firebase-tools@latest emulators:start
Lines read
284
File checksum (to compare versions)
ffd81564c0edf948c4199979052938e0b32f43529f2a2316fbb0c8ceb29ab58a