GithubHelp home page GithubHelp logo

llm-research's Introduction

Secure Coding with LLMs

Seting up the Environment

Add your openAI API key in an environment variable and install all the dependencies.

export OPENAI_API_KEY=openai-api-key
pip install -r requirements

Static Analysis Tools

For C/C++, already installed with pip.

For Python, already installed with pip.

For Java, download the zip file from the official manual and unzip it.

Most of its security rules are for JavaScript/TypeScript, run the following command or see the instructions for other install method.

curl -sfL https://raw.githubusercontent.com/Bearer/bearer/main/contrib/install.sh | sh

Running the Pipeline

python pipeline.py

The first step of the pipeline is to enter a filename that contains the vulnerable code that you would like to be fixed.

The file that contains vulnerable code:

The next user input is contextual code.

Do you have any contextual code (y/n)

If you enter y you will then be prompted to enter the contextual code.

The code in plaintext:

The last thing you have to input is the consequences of insecure code.

What are the consequences if the code is not secure?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.