Utilising Generative AI securely: 5 factors to consider when using generative AI

Published: 10 August 2023

Generative AI, an AI model designed to generate data similar to what it’s trained on, has seen a remarkable surge in popularity, especially with the advent of technologies like GPT-3 and DALL-E. However, as with any technological advance, the security implications are paramount. This article will dive into five key considerations to ensure you’re using Generative AI safely and effectively.

Understanding Open Source Licenses

Open source is the beating heart of innovation. From TensorFlow to PyTorch, many AI platforms have thrived due to open-source communities. However, this openness is a double-edged sword.

Using open-source AI models brings both benefits and potential pitfalls. The main risk is the unmonitored modifications: anyone can contribute, which might introduce vulnerabilities. Furthermore, without standardized security protocols, users could be exposed to risks unknowingly.

It’s essential to understand the licenses attached to each tool or library you use. For instance:

GPLv3 ensures that derivatives of open-source projects remain open. 

MIT is more permissive, allowing private modifications and distributions.

Apache 2.0, another permissive license, also includes an express grant of patent rights from contributors to users.

The key is to ensure compliance and understand the limitations and responsibilities of the chosen license.

Risks of Embedded Secrets in Code Bases

An alarming number of breaches occur due to oversights like exposed API keys, tokens, and passwords. A study by North Carolina State University found that over 100,000 repositories on GitHub had leaked API tokens and cryptographic keys.

One frequent misstep is leaving sensitive keys in version control histories, especially in public repositories. Just an inadvertent push of a configuration file can expose crucial data, making the entire system vulnerable.

Incorporating Out-of-Date or Vulnerable Dependencies

Using outdated libraries or frameworks is like leaving your front door unlocked. One report showed that 37% of global packages have at least one vulnerability, with JavaScript and Ruby demonstrating particularly high vulnerability rates.

To prevent potential breaches, regularly audit and update dependencies. Tools like Code Insights can automatically check for outdated libraries and identify and fix vulnerabilities.

Maintaining Privacy and Data Integrity

Generative AI models, by design, can reproduce patterns from their training data. This can lead to inadvertent data leaks. A study showcased how GPT-2 could be prompted in specific ways to output pieces of its training data.

Ensure that any data you feed into a generative model isn’t traceable back to its source. This not only safeguards against reverse engineering but also ensures compliance with privacy laws such as GDPR.

Ongoing Monitoring and Evaluation

Like any system, AI models need to adapt over time, especially as new vulnerabilities and security threats emerge. The security of AI systems should be periodically assessed.

One effective method is to adopt a continuous learning approach, where models are constantly updated and fine-tuned based on emerging threats. The open-source community plays a pivotal role here, offering feedback and insights to keep everyone informed of potential vulnerabilities.


The realm of Generative AI is rapidly expanding, presenting a myriad of opportunities and challenges. As businesses and developers, it’s our responsibility to prioritize security alongside innovation. With a proactive, informed approach, the immense potential of Generative AI can be harnessed without compromising security.

Code Insights and Secrets Detection

BlueOptima supports organisations in implementing Generative AI into their software development processes with Code Insights, which maps dependencies and identifies vulnerabilities in the code, and Secrets Detection, our tool that continually reviews your codebase to identify any secrets that have been introduced and lags them to be fixed.

Related articles...

6 Ways to Reduce Halstead Complexity in Software Engineering

Introduction Halstead Complexity Measures are crucial metrics in software development,…

Read More
Top 4 AI Source Code Detector Tools for Enterprises

Why we need AI Source Code Detection Tools In the…

Read More
7 Code Review Best Practices in 2024: Elevate Software Quality

Getting a good code review process up and running can…

Read More

Bringing objectivity to your decisions

Giving teams visibility, managers are enabled to increase the velocity of development teams without risking code quality.


out of 10 of the worlds biggest banks


of the S&P Top 50 Companies


of the Fortune 50 Companies