Skip to content
Report library
Purpose / Other

Firebase Hosting Basics Skill Security Audit

What the author says it does (original text)

>-

Independent security check

Do not install or run it yet

Files checked
3
Risks found
3
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

Commands automatically run an unpinned latest npm package

Source references: 3
What we found

Every command uses `npx -y firebase-tools@latest`. The `latest` target can change whenever the publisher releases a version, while `-y` automatically accepts installation, so the executed code is not fixed to a reviewed release.

Why this matters

If the upstream package, publisher account, or a new release is compromised, the command could run malicious code with the user's permissions, read local files or Firebase credentials, and affect logged-in cloud projects.

These are directly executable commands. `npx -y` skips installation confirmation, while `@latest` does not pin a version, so different Firebase CLI code may be downloaded and run over time. This is a common way to invoke an official CLI temporarily, but it exposes the machine and available Firebase credentials to whatever package npm serves as latest. A user can ask for a pinned, reviewed version or restrict automatic installation and network access.

SKILL.md:63In the instructionsOpen original file
```bashnpx -y firebase-tools@latest emulators:start --only hosting```
Show 2 other places
references/deploying.md:7In the instructionsOpen original file
```bashnpx -y firebase-tools@latest deploy --only hosting```
references/deploying.md:20In the instructionsOpen original file
```bashnpx -y firebase-tools@latest hosting:channel:deploy CHANNEL_ID```
Could it expose your files or keys?Looks for uploads of files containing passwords or keys, and keys written directly in the code.No risks found
Could it delete files or keep running?Looks for broad file deletion, disk overwrites, and programs set to start automatically.Risks found: 1
High risk

Production commands lack target-project verification and pre-deployment confirmation

Source references: 2
What we found

The documentation directly provides a command that deploys to default live sites and another that clones a preview channel to `live`, without requiring the current Firebase project, target site, diff, or user approval to be displayed and checked first.

Why this matters

If the CLI currently selects the wrong project, or the agent substitutes an incorrect example value, it can overwrite a real site's content and routing. Incorrect pages may become public immediately and disrupt production service.

The document explicitly instructs deployment to the default live sites and provides a command that clones a chosen preview channel directly to `live`. The shown workflow contains no check of the active project, target site, or release contents and no confirmation gate. If an agent follows it while authenticated to the wrong project, it could replace a public site. A user can require the project, site, and changes to be shown and explicitly approved first, and use a preview channel before production.

references/deploying.md:5In the instructionsOpen original file
To deploy your Hosting content and configuration to your live site:```bashnpx -y firebase-tools@latest deploy --only hosting```This deploys to your default sites (`PROJECT_ID.web.app` and`PROJECT_ID.firebaseapp.com`).
Show 1 other places
references/deploying.md:35In the instructionsOpen original file
## Cloning to LiveYou can promote a version from a preview channel to your live channel withoutrebuilding.```bashnpx -y firebase-tools@latest hosting:clone SOURCE_SITE_ID:SOURCE_CHANNEL_ID TARGET_SITE_ID:live```
Could it bypass safety checks?Looks for skipped website security checks, excessive file access, or actions that skip your approval.Risks found: 1
Medium risk

The rewrite example places a global wildcard before API and container routes

Source references: 2
What we found

The first rewrite shown matches every path with `**`, while `/api/**` and `/container/**` appear afterward. Under first-match routing semantics, the global rule handles those requests before the specific routes can be reached.

Why this matters

If copied in this order, API or Cloud Run requests may receive the SPA's `index.html`, breaking endpoints, causing incorrect caching, or interrupting production features.

What this evidence establishes

The example does place the global `**` rewrite before `/api/**` and `/container/**`, so the later routes could be unreachable if Firebase uses first-match-wins semantics. However, the supplied source does not state rewrite precedence or show that this example is automatically written or deployed; ordering alone cannot establish the resulting control flow. A user can ask the author to cite Firebase's precedence rule and provide route-test results.

This assessment concerns the code and conditions shown, not proof that harm has occurred.
references/configuration.md:42In the instructionsOpen original file
```json"rewrites": [  {    "source": "**",    "destination": "/index.html"  },  {    "source": "/api/**",    "function": "apiFunction"  },  {    "source": "/container/**",    "run": {      "serviceId": "helloworld",      "region": "us-central1"    }  }]```
Show 1 other places
references/configuration.md:37In the instructionsOpen original file
### `rewrites` (Optional)Serve the same content for multiple URLs, useful for SPAs or Dynamic Content.
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.No risks found

Inside this skill

3 instruction sections

This Skill targets classic Firebase Hosting and provides guidance for static directories, redirects, rewrites, and response headers; it explicitly excludes App Hosting, Auth, and Firestore-related work.

View source
SKILL.md:2In the instructionsOpen original file
---name: firebase-hosting-basicsdescription: >-  Deploys and configures classic Firebase Hosting for static websites, single-page apps (SPAs), and microservices. Use when deploying static sites/SPAs, setting up custom domains, configuring firebase.json hosting settings (redirects, rewrites, headers, multi-site), or managing preview channels. Don't use for Firebase App Hosting (Next.js/SSR), Auth, Firestore queries/rules, Data Connect, or Crashlytics.metadata:

It uses the Firebase CLI for local emulation, preview deployment, and production deployment. The shown commands would act with the Firebase identity and current project configuration available in the execution environment.

View source
SKILL.md:61In the instructionsOpen original file
To test your app locally:```bashnpx -y firebase-tools@latest emulators:start --only hosting```
references/deploying.md:3In the instructionsOpen original file
## Standard DeploymentTo deploy your Hosting content and configuration to your live site:```bashnpx -y firebase-tools@latest deploy --only hosting```
references/deploying.md:18In the instructionsOpen original file
### Deploy to a Preview Channel```bashnpx -y firebase-tools@latest hosting:channel:deploy CHANNEL_ID```

The `public` field selects the directory to be deployed. The full example excludes the Firebase configuration, hidden files, and `node_modules`.

View source
references/configuration.md:8In the instructionsOpen original file
### `public` (Required)Specifies the directory to deploy to Firebase Hosting.```json"hosting": {  "public": "public"}```
references/configuration.md:98In the instructionsOpen original file
{  "hosting": {    "public": "dist",    "ignore": [      "firebase.json",      "**/.*",      "**/node_modules/**"    ],    "rewrites": [

Preview channels expire after seven days by default, and a preview version can be cloned directly to the live channel without rebuilding.

View source
references/deploying.md:27In the instructionsOpen original file
### ExpirationChannels expire after 7 days by default. To set a different expiration:```bashnpx -y firebase-tools@latest hosting:channel:deploy CHANNEL_ID --expires 1d```
references/deploying.md:35In the instructionsOpen original file
## Cloning to LiveYou can promote a version from a preview channel to your live channel withoutrebuilding.```bashnpx -y firebase-tools@latest hosting:clone SOURCE_SITE_ID:SOURCE_CHANNEL_ID TARGET_SITE_ID:live```
Start here · InstructionsSKILL.md
firebase-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: 2
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 records3 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/configuration.mdFull text included
  • references/deploying.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/configuration.mdSupporting file
  • references/deploying.mdSupporting file

Operations mentioned in code and instructions

Run commands
SKILL.md:63In the instructionsOpen original file
```bashnpx -y firebase-tools@latest emulators:start --only hosting
references/deploying.md:7In the instructionsOpen original file
```bashnpx -y firebase-tools@latest deploy --only hosting
references/deploying.md:20In the instructionsOpen original file
```bashnpx -y firebase-tools@latest hosting:channel:deploy CHANNEL_ID
Install extra software packages
SKILL.md:64In the instructionsOpen original file
```bashnpx -y firebase-tools@latest emulators:start --only hosting```
references/deploying.md:8In the instructionsOpen original file
```bashnpx -y firebase-tools@latest deploy --only hosting```
references/deploying.md:21In the instructionsOpen original file
```bashnpx -y firebase-tools@latest hosting:channel:deploy CHANNEL_ID```
Connect to websites
SKILL.md:67In the instructionsOpen original file
This serves your app at `http://localhost:5000` by default.
Lines read
233
File checksum (to compare versions)
defc58cc9cd134d87ded73d9cb7d18e602e9d7b04081bca8a7ecfb9605ced482