API Security: An Ongoing Process and Not a One-Time Project

September 2, 2024

API Security: An Ongoing Process and Not a One-Time Project

Since our inception, we at Levo have pioneered and championed a proactive approach to API Security- one that empowers your DevSecOp teams to build security into APIs and, as a result, applications instead of chasing false positives in production. 

This approach mandates comprehensive and continuous- API Visibility, pre-production testing, and monitoring. 

This approach has gained widespread acceptance, with 78% of surveyed enterprises prioritizing vulnerability detection in pre-production environments.

However, as this approach becomes more widely adopted, new questions arise, such as: 

‘Why can't this be a one-time process? Why do we need continuous discovery, documentation, and testing?’

This blog explains how the very nature of modern applications, APIs, and Compliance schemes mandate an ongoing commitment to API Security. 

Sky Rocketing API Adoption 

APIs have been around for a while, but their adoption has surged recently. 

APIs have become indispensable as organizations move toward distributed applications with containerized environments.

Enterprises are updating their APIs at an unprecedented pace—9% roll out daily changes, 28% update weekly, and 27% monthly. 

Yet the synchronization between API updates and documentation needs to catch up. A mere 12% of enterprises manage to update their Swagger files weekly, while an alarming 20% have no regular update schedule at all. 

And this is a bigger problem than most would recognize. 

Consider this: your development team deploys several new APIs and endpoints yet fails to update the API inventory so they go untested and unmonitored by your quality and security teams. 

For example, a new API designed for internal communication might be inadvertently exposed to the internet without authentication. An attacker could exploit this exposure to access internal services, potentially leading to a data breach, service disruption, or even an entire system compromise.

Continuous Deployment

The shift from traditional development methodologies like Waterfall to Agile and DevOps has made organizations more efficient and profitable. 

Tools like CI/CD pipelines and Kubernetes have streamlined the deployment of smaller, more frequent updates.

However, frequent deployments, while beneficial for rapidly delivering updates and features, also introduce new vulnerabilities, particularly in APIs. 

These deployments often lead to configuration drift and misconfigurations as server, gateway, or API configurations are tweaked or new configuration files are introduced. Continuous iterations also involve adding or updating third-party APIs, which can introduce newer vulnerabilities if these APIs are not secure.

Without continuous testing, these vulnerabilities go unnoticed and untested, exposing your entire API and application to exploitation. 

Moreover, deployments aren't limited to API updates but also encompass changes to microservices, which often rely on third-party libraries or other services. 

Updating these dependencies can introduce vulnerabilities if the new versions contain security flaws. For instance, an update to a library used for authentication might weaken the security of the login process, allowing unauthenticated access.

Changing Infrastructure

Not every API vulnerability stems from code; they can also arise from infrastructure changes, even when the code remains unchanged.

As code moves from one environment to another, deployment configurations inevitably change. 

For example, you might have an application with a policy for applying rate limiting, which is enforced at the API gateway level. 

However, if you update the API gateway's configuration—perhaps to optimize performance, adjust to new traffic patterns, or integrate new services—you could inadvertently alter some of the rate-limiting parameters. Such changes might disrupt DDoS protection, leaving your APIs vulnerable to attacks.

Environments are always in flux due to continuous integration, deployment practices, and the need to adapt to evolving business requirements.

Infrastructure as Code (IaC) is often used to manage these changes but it can also lead to discrepancies between environments. 

For instance, a configuration that works perfectly in a staging environment might behave differently in production due to differences in scale, network latency, or integration with third-party services. 

Additionally, routine updates to infrastructure components like load balancers, API gateways, and security policies can introduce new variables, further complicating the security landscape.

Integration of Open Source Software & APIs 

Integrating Open Source software with enterprise applications helps developers add enhanced functionality while reducing time to market and deployment costs. 

However, this integration also introduces significant security risks, as OSS and Open APIs are not fully under the enterprise's control.

Risks that are becoming harder to ignore and solve manually as, according to a recent survey, Open APIs constituted 32% of the total APIs within enterprise networks. 

These risks are exacerbated when updates are released on these Open Source components. 

Open APIs often rely on third-party libraries that may themselves be vulnerable. 

When these libraries are updated, they might introduce security flaws into the API, mainly if the update includes changes to critical components like authentication, data processing, or logging mechanisms.

For example, your developers use Google's Java library and then upgrade to a newer version to address current vulnerabilities. 

However, this update could also introduce new vulnerabilities and expose your system to additional risks.

Waiting for Open Source Software contributors to detect and remediate vulnerabilities is not always recommended. 

Instead of waiting for updates, developers should proactively identify and fix vulnerabilities —something that’s only possible with continuous API testing.

Compliance and Reporting

Even if your code, environments, and infrastructure remain constant, continuous API security is mandatory for maintaining compliance. 

Many compliance schemes, especially PCI DSS 4.0, mandate regular security testing of systems and networks, which includes APIs. Vulnerability reports showcasing testing coverage must be submitted to compliance agencies.

Furthermore, new Common Vulnerabilities and Exposures are discovered continuously, which means the attack patterns you test for today might not cover emerging threats tomorrow. 

While essential, threat modeling cannot guarantee the detection of every possible attack vector—it operates on a best-effort basis. 

As new breaches occur and novel attack techniques emerge, new test cases to test your APIs against them are developed, underscoring the need for continuous testing. 

Automate API Security with Levo.ai

  1. As a part of our API Discovery, we automatically discover, version, and notify you of new APIs, and updates made to your APIs. Our API inventory is kept complete at any point because of continuous discovery.
  2. As of continuous API documentation, we generate API changelogs, as if your team is writing release notes for your applications. No changes go undocumented with this continuous process.
  3. As part of continuous sensitive data analysis, the exchange of any sensitive data in your environment will be flagged immediately, without delay.
  4. With our continuous monitoring of API traffic, misconfigurations, violations, findings, and lack of best practices surfaced in real-time.
  5. With our continuous security testing, you can ensure that any new APIs that fit the specified criteria will automatically be tested against dozens of test cases, assuring you of vulnerability-free application releases to production‍.
elliptical light
  • Runtime Agnostic
  • Cloud Agnostic
  • Programming Language Agnostic

Subscribe for experts insights on application security.

Oops! Something went wrong while submitting the form.