Proxy server to prevent unexpected information leakage when using Github Copilot
English | 日本語
The configuration file settings.yaml.template
is written in YAML format. An example of a configuration file is shown below.
ignore_keywords:
- 'API_KEY="'
- src/secret.py
replace_keywords:
- keyword: ph
replace: myorg
- ignore_keywords is a list of keywords to be ignored to raise an exception.
- replace_keywords is a list of keywords to replace and their replacement values
- keyword is the keyword to replace
- replace is a string that will be replaced if the keyword matches.
$ cp settings.yaml.template docker/proxy/settings.yaml
$ docker-compose up -d --build proxy
Add the following to the github copilot extension settings
"github.copilot.advanced": {
"debug.overrideProxyUrl": "http://localhost:8000"
}
The submitted source code can be viewed as follows.
$ tail -f logs/audit.log
$ cat logs/audit.log | grep 'secret keyword