Our fork of Better ChatGPT is introducing two new security-enhancing features.
This feature can be enabled or disabled for each individual prompt. When enabled, it adds the a prefix the prompt:
This prefix reduced the number code vulnerabilities on average by 47% for gpt-4o-mini, and by 56% for gpt-4o (snapshot 2024-08-06) on the Secure Prompt Benchmark.The "Code Security Agent" and can be enabled in the settings. If enabled, markdown code-blocks in the response are intercepted.
The intercepted blocks are sent to the LLM for security-critique and improvement. The code from the improvement response is then extracted and inserted back into the original answer.Using the Code Security Agent with gpt-4o-2024-08-06 can reduce the number of vulnerabilities on average by 64.7% without, and 68.7% with the Code Security Prefix on the Secure Prompt Benchmark.
Since the Code Security Agent is interacting with the LLM multiple times, it can be very slow. It can also make the code snippets overly verbose, and sometimes even break the code. This feature is intended to gain insights into the implications of using this technique, and is therefore marked as experimental.
While these features can help reduce the number of code vulnerabilities, they are not a substitute for a sec
8000
urity audit by a professional.
The features are experimental and may not work as expected in all cases.
Security-Aware ChatGPT comes with a bundle of amazing features from Better ChatGPT! Here are some of them:
- Proxy to bypass ChatGPT regional restrictions
- Prompt library
- Organize chats into folders (with colours)
- Filter chats and folders
- Token count and pricing
- ShareGPT integration
- Custom model parameters (e.g. presence_penalty)
- Chat as user / assistant / system
- Edit, reorder and insert any messages, anywhere
- Chat title generator
- Save chat automatically to local storage
- Import / Export chat
- Download chat (markdown / image / json)
- Sync to Google Drive
- Azure OpenAI endpoint support
- Multiple language support (i18n)
To get started, run it locally or host your own instance. There are 3 ways for you to start using Security Aware ChatGPT.
- Enter into the API menu your OpenAI API Key obtained from OpenAI API Keys.
- Utilise the api endpoint proxy provided by ayaka14732/ChatGPTAPIFree (if you are in a region with no access to ChatGPT)
- Host your own API endpoint by following the instructions provided here: https://github.com/ayaka14732/ChatGPTAPIFree. Subsequently, enter the API endpoint into the API menu.
If you'd like to run your own instance of Security Aware ChatGPT, you can easily do so by following these steps:
One click deploy with Vercel
- Create a GitHub account (if you don't have one already)
- Star this repository โญ๏ธ
- Fork this repository
- In your forked repository, navigate to the
Settings
tab - In the left sidebar, click on
Pages
and in the right section, selectGitHub Actions
forsource
. - Now, click on
Actions
- In the left sidebar, click on
Deploy to GitHub Pages
- Above the list of workflow runs, select
Run workflow
. - Navigate back to the
Settings
tab - In the left sidebar, click on
Pages
and in the right section. Then at the top section, you can see that "Your site is live atXXX
".
-
Ensure that you have the following installed:
-
Clone this repository by running
git clone https://github.com/mbscit/BetterChatGPT-Securityaware.git
-
Navigate into the directory by running
cd BetterChatGPT-Securityaware
-
Run
yarn
ornpm install
, depending on whether you have yarn or npm installed. -
Launch the app by running
yarn dev
ornpm run dev
-
Ensure that you have the following installed:
- docker (v24.0.7 or above)
curl https://get.docker.com | sh \ && sudo usermod -aG docker $USER
- docker (v24.0.7 or above)
-
Build the docker image
docker compose build
-
Build and start the container using docker compose
docker compose build docker compose up -d
-
Stop the container
docker compose down
Thanks to all the contributors of BetterChatGPT, who provided the foundation of this fork!
If you have enjoyed using our app, we kindly ask you to give this project a โญ๏ธ. Your endorsement means a lot to us and encourages us to work harder towards delivering the best possible experience.
If you would like to support the team behind Better ChatGPT, consider sponsoring them through one of the methods below. Every contribution, no matter how small, helps us to maintain and improve their service.
Payment Method | Link |
---|---|
GitHub | |
KoFi | |
Alipay (Ayaka) | |
Wechat (Ayaka) |
Thank you for being a part of our community, and we look forward to serving you better in the future.