Hub rules-github-copilot

rules-github-copilot

v2 public Verified

Github-copilot

GitHub Copilot is an AI-powered code completion tool that provides suggestions as you type. These rules govern Copilot configuration, telemetry settings, and safe interaction patterns for AI agents.

@sigmashakeinc 2 pulls 13 rules published Apr 8, 2026 synced Nov 22, 2026 sigmashakeinc/rules/rulesets/rules-github-copilot →
Severity
5 error 5 warn 3 info
demo.cast
GitHub Copilot is an AI-powered code completion tool that provides suggestions as you type. These rules govern Copilot configuration, telemetry settings, and safe interaction patterns for AI agents.

Rules index

13 governance rules

Indexed from the repository's .rules files, grouped by technology. Expand any rule to read the raw source.

copilot

ask-copilot-base64-encoded-url warning log

Base64-decoded URL in Copilot-generated code. CamoLeak-style attacks encode exfiltration endpoints in base64 to bypass visual inspection and CSP analysis. Decode and verify the URL before accepting this suggestion.

Rule source requires an active Pro or Enterprise subscription.
ask-copilot-dynamic-module-load warning log

Dynamic import with string concatenation in Copilot-generated code. Concatenated import paths can load typosquatted or attacker-controlled packages by constructing package names at runtime — hiding them from static analysis and dependency scanning.

Rule source requires an active Pro or Enterprise subscription.
ask-copilot-execute-generated-script warning ask

Executing a generated script. An ACM study found 29.5% of Copilot-generated Python and 24.2% of JavaScript contains security weaknesses. Scripts should be reviewed before execution, especially those that handle user input, network requests, or file operations.

Rule source requires an active Pro or Enterprise subscription.
ask-copilot-package-install warning ask

Package installation from Copilot suggestion. Copilot may suggest typosquatted or deprecated packages from training data. 'requests2', 'urllib3-fix', and thousands of malicious typosquats exist on PyPI and npm.

Rule source requires an active Pro or Enterprise subscription.
ask-copilot-rules-file-modification warning log

Copilot configuration file modification. The Rules File Backdoor attack embeds hidden instructions in these files that silently alter Copilot's behavior for all developers using the repository. This is a documented supply chain attack vector.

Rule source requires an active Pro or Enterprise subscription.
log-copilot-dangerous-patterns info log

Copilot suggestion contains high-risk pattern (eval/Function/innerHTML). An ACM study found 29.5% of Copilot-generated Python and 24.2% of JavaScript snippets have security weaknesses. Review these patterns carefully for injection vulnerabilities before accepting.

Rule source requires an active Pro or Enterprise subscription.
log-copilot-instruction-file-access info log

Copilot instruction file accessed. All reads of Copilot config files are logged for Rules File Backdoor detection. Monitor for unexpected modifications to these files — especially in recently cloned repositories.

Rule source requires an active Pro or Enterprise subscription.
log-copilot-pre-push info log

Git push from Copilot session. CamoLeak demonstrated silent exfiltration of secrets from private repos via Copilot Chat. Verify no secrets were added to tracked files before pushing. Run 'git diff HEAD --stat' to review changes.

Rule source requires an active Pro or Enterprise subscription.
no-copilot-bidi-override-chars error block

Bidirectional text override or zero-width Unicode characters. These are the exact character classes used in Rules File Backdoor attacks to hide malicious Copilot instructions that are invisible when rendered in editors, code review tools, and GitHub diffs, but are processed by the Copilot language model.

Rule source requires an active Pro or Enterprise subscription.
no-copilot-credential-suggestion error block

Copilot credential suggestion from training data. Research (Chinese University of Hong Kong) built an algorithm that extracts real secrets from Copilot suggestions — the model memorizes credentials from training data and suggests them in completions. Never accept suggested credential values. Use environment variables.

Rule source requires an active Pro or Enterprise subscription.
no-copilot-hidden-chars-in-rules error block

Rules File Backdoor: hidden control characters in Copilot config. Pillar Security discovered that attackers embed invisible malicious instructions (using control characters 0x00-0x1f) in .copilot-rules files. These instructions are invisible in editors but processed by Copilot, silently altering all code suggestions.

Rule source requires an active Pro or Enterprise subscription.
no-copilot-token-in-command error block

Secret token in shell command. CamoLeak research demonstrated that Copilot can suggest commands containing real credentials. Passing tokens as command-line arguments exposes them in process lists, shell history, and CI logs. Use environment variables or credential helpers.

Rule source requires an active Pro or Enterprise subscription.
no-copilot-zero-width-with-network error block

CamoLeak (CVSSv3 9.6, June 2025): zero-width Unicode characters combined with HTTP/fetch calls silently exfiltrate secrets and source code from private repos. This attack uses Copilot Chat's trust in GitHub's own infrastructure to bypass CSP. Writing code with invisible Unicode plus network calls is blocked.

Rule source requires an active Pro or Enterprise subscription.

Version metadata

Published metadata

The hash-locked record of this published ruleset. When source contents change, the maintainer resyncs and the version bumps.

Version
v2
Published
Apr 8, 2026
Source commits
0
Synced
Nov 22, 2026
Hash
95df9871e08acefaf08c34685bac4107745142ba59fd3cb21ed4a1b7ba37ddca
Signature
Verified (publisher key)
Tested with
claude-code@current
Plan
Starter (free)
Visibility
Public

Source history

Recent commits

Latest commits touching rulesets/rules-github-copilot/.sigmashake/rules in sigmashakeinc/rules/rulesets/rules-github-copilot. The published version only bumps when a maintainer resyncs.

No commit history available.