Skip to content

fix(docs): add /terms and /privacy redirects for footer links - #29667

Open
ashishgit4 wants to merge 3 commits into
google-gemini:mainfrom
ashishgit4:main
Open

ashishgit4 wants to merge 3 commits into
google-gemini:mainfrom
ashishgit4:main

Conversation

@ashishgit4

@ashishgit4 ashishgit4 commented Oct 7, 2026 •

Copy link
Copy Markdown

Summary

Fixes the non-clickable Google Developers link displayed in the footer of the Gemini CLI website.

Details

The Google Developers link/logo at the bottom of https://geminicli.com/ is displayed as part of the website footer, but clicking it does not navigate to the intended Google Developers destination.

This change makes the footer element a proper clickable link so users can navigate to the Google Developers website.

Related Issues

Fixes #YOUR_ISSUE_NUMBER

How to Validate

  1. Open https://geminicli.com/
  2. Scroll to the bottom of the page.
  3. Locate the Google Developers link/logo in the footer.
  4. Hover over the link and verify that it behaves like a clickable link.
  5. Click the link.
  6. Verify that it navigates to the intended Google Developers page.
  7. Verify that the footer layout and styling remain unchanged.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • Browser / website

@ashishgit4
ashishgit4 requested review from a team as code owners October 7, 2026 05:06
@github-actions github-actions Bot added the size/l A large sized PR label Oct 7, 2026
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown

📊 PR Size: size/L

  • Lines changed: 931
  • Additions: +134
  • Deletions: -797
  • Files changed: 7

@google-cla

google-cla Bot commented Oct 7, 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

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 updates the documentation routing to improve accessibility for common footer links. By adding redirects for /terms and /privacy, users are correctly routed to the existing Terms of Service and Privacy documentation. Additionally, the PR includes a local testing script to ensure these redirects function as expected and cleans up unused snapshot files.

Highlights

  • Documentation Redirects: Added new URL redirects for /terms and /privacy to point to the existing /docs/resources/tos-privacy page in docs/redirects.json.
  • New Documentation Page: Created a new docs/terms.md file to handle the redirection logic.
  • Testing Utility: Added a local test-redirects.js script to verify the redirect functionality.
  • Cleanup: Removed several outdated SVG snapshot files from the CLI component directory.
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 the 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 counterproductive. 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.

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. ↩

@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 adds redirects for /terms and /privacy to /docs/resources/tos-privacy in docs/redirects.json, introduces a redirect markdown file docs/terms.md, removes several unused SVG assets, and adds a local test server test-redirects.js to verify the redirect logic. A high-severity path traversal vulnerability was identified in the test server's serveMarkdownAsHtml function, where untrusted URL paths are resolved without sanitization. It is recommended to resolve and validate the paths against the docsRoot directory to prevent unauthorized file access.

Comment thread test-redirects.js
Comment on lines +19 to +25
function serveMarkdownAsHtml(filePath, res) {
const docsRoot = path.join(__dirname, 'docs');
const fullPath = path.join(docsRoot, filePath + '.md');
const indexPath = path.join(docsRoot, filePath, 'index.md');
const mdPath = fs.existsSync(fullPath) ? fullPath
: fs.existsSync(indexPath) ? indexPath
: null;

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

The filePath parameter is constructed from the request URL pathname and passed directly to path.join without sanitization. This allows a path traversal attack (e.g., using .. segments) to access files outside the docs directory.

To prevent this, resolve the paths using path.resolve and verify that they start with the resolved docsRoot directory.

function serveMarkdownAsHtml(filePath, res) {
  const docsRoot = path.resolve(__dirname, 'docs');
  const fullPath = path.resolve(docsRoot, '.' + filePath + '.md');
  const indexPath = path.resolve(docsRoot, '.' + filePath, 'index.md');

  if (!fullPath.startsWith(docsRoot) || !indexPath.startsWith(docsRoot)) {
    res.writeHead(403, { 'Content-Type': 'text/plain' });
    res.end('403: Access Denied');
    return;
  }

  const mdPath = fs.existsSync(fullPath) ? fullPath
    : fs.existsSync(indexPath) ? indexPath
    : null;
References
  1. Sanitize file paths extracted from untrusted sources to prevent path traversal (..), null byte injection ( 0), and other vulnerabilities.

@ashishgit4 ashishgit4 changed the title fix(docs): add /terms and /privacy redirects for footer links (#29363) fix(docs): add /terms and /privacy redirects for footer links Oct 7, 2026
@gemini-cli gemini-cli Bot added the status/need-issue Pull requests that need to have an associated issue. label Oct 7, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/l A large sized PR status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant