<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rob Gil on Medium]]></title>
        <description><![CDATA[Stories by Rob Gil on Medium]]></description>
        <link>https://medium.com/@rem5?source=rss-6d8d39499d2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xuhITHuYPEZg4dTloZZk6Q.jpeg</url>
            <title>Stories by Rob Gil on Medium</title>
            <link>https://medium.com/@rem5?source=rss-6d8d39499d2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 23:23:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rem5/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Public Containers Are Insecure. Now You Can Prove Why.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@rem5/public-containers-are-insecure-now-you-can-prove-why-bcb94f285757?source=rss-6d8d39499d2------2"><img src="https://cdn-images-1.medium.com/max/1592/1*MTqRDToN2Q27rUiJk6L1rw.png" width="1592"></a></p><p class="medium-feed-snippet">The top containers on DockerHub still struggle with basic hardening. The basics: running as root, mutable :latest tags, build tools in the&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@rem5/public-containers-are-insecure-now-you-can-prove-why-bcb94f285757?source=rss-6d8d39499d2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@rem5/public-containers-are-insecure-now-you-can-prove-why-bcb94f285757?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/bcb94f285757</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[supply-chain]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Mon, 25 May 2026 12:41:00 GMT</pubDate>
            <atom:updated>2026-05-25T12:41:00.621Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Why Your Federal Program Needs a Federal Architecture Function]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@rem5/why-your-federal-program-needs-a-federal-architecture-function-2221a0a7764c?source=rss-6d8d39499d2------2"><img src="https://cdn-images-1.medium.com/max/1745/1*fMHHKGwvJ0wclekEMUXbhA.png" width="1745"></a></p><p class="medium-feed-snippet">Closing the gap between engineering and compliance &#x2014; before it costs you an audit</p><p class="medium-feed-link"><a href="https://medium.com/@rem5/why-your-federal-program-needs-a-federal-architecture-function-2221a0a7764c?source=rss-6d8d39499d2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@rem5/why-your-federal-program-needs-a-federal-architecture-function-2221a0a7764c?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/2221a0a7764c</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[federal-government]]></category>
            <category><![CDATA[compliance]]></category>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Wed, 20 May 2026 12:41:00 GMT</pubDate>
            <atom:updated>2026-05-20T12:41:00.502Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Developing with Open Source Local LLMs and Tools]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@rem5/developing-with-open-source-local-llms-and-tools-099d06946701?source=rss-6d8d39499d2------2"><img src="https://cdn-images-1.medium.com/max/2600/1*Lrhqd8shJkcyWmVUl7iEcA.png" width="3464"></a></p><p class="medium-feed-snippet">Let me tell you what I can do on a Mac Studio M2 with 64G unified memory. This is an article about local development and real world&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@rem5/developing-with-open-source-local-llms-and-tools-099d06946701?source=rss-6d8d39499d2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@rem5/developing-with-open-source-local-llms-and-tools-099d06946701?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/099d06946701</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Sat, 16 May 2026 02:30:58 GMT</pubDate>
            <atom:updated>2026-05-16T02:30:58.548Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Cline Kanban made me upgrade from Claude Code Pro to Claude Code Max]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@rem5/cline-kanban-made-me-upgrade-from-claude-code-pro-to-claude-code-max-05057f47869b?source=rss-6d8d39499d2------2"><img src="https://cdn-images-1.medium.com/max/2600/1*YmYY9C3W5rpeivahWcl6Qg.png" width="3022"></a></p><p class="medium-feed-snippet">As the ecosystem of AI tools continues to change, the IDE is quickly finding its way to the dustbin of history. As agentic development&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@rem5/cline-kanban-made-me-upgrade-from-claude-code-pro-to-claude-code-max-05057f47869b?source=rss-6d8d39499d2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@rem5/cline-kanban-made-me-upgrade-from-claude-code-pro-to-claude-code-max-05057f47869b?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/05057f47869b</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Sun, 10 May 2026 18:31:18 GMT</pubDate>
            <atom:updated>2026-05-10T18:31:18.249Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Claude Code is introducing old bad practices in new ways.]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@rem5/claude-code-is-introducing-old-bad-practices-in-new-ways-fc7273ef8efd?source=rss-6d8d39499d2------2"><img src="https://cdn-images-1.medium.com/max/960/1*ZVgC8MCx9sbRPd_noIfTBw.jpeg" width="960"></a></p><p class="medium-feed-snippet">Let&#x2019;s discuss.</p><p class="medium-feed-link"><a href="https://medium.com/@rem5/claude-code-is-introducing-old-bad-practices-in-new-ways-fc7273ef8efd?source=rss-6d8d39499d2------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@rem5/claude-code-is-introducing-old-bad-practices-in-new-ways-fc7273ef8efd?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc7273ef8efd</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[security]]></category>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Wed, 06 May 2026 14:06:08 GMT</pubDate>
            <atom:updated>2026-05-06T14:06:08.244Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Shifting LEFT (security)]]></title>
            <link>https://medium.com/@rem5/shifting-left-security-eeb83e0f5dc1?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/eeb83e0f5dc1</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Tue, 26 Nov 2024 19:17:14 GMT</pubDate>
            <atom:updated>2024-11-26T20:17:11.258Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*QiIkg4azvTIYHzNW" /><figcaption>Photo by <a href="https://unsplash.com/@jannerboy62?utm_source=medium&amp;utm_medium=referral">Nick Fewings</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>There are really two kinds of vulnerabilities. Software flaws and Configuration flaws. NIST 800–53 likes to classify these in different controls. RA-5 (Vulnerability Scanning) and CM-6 (Configuration Settings). A misconfigured system can be just as dangerous, if not more dangerous than an unpatched system. Imagine having a passwordless root login for example. This is comically terrible, but you get the idea.</p><p>So what can we do to address these as early as possible? Shift left of course. Now there are many opinions on what “shift left” means. To me it means giving the developers the tools for self service validation. If your developers don’t have the ability to scan for vulnerabilities or scan for configuration misconfigurations, they’re going to ship vulnerable software.</p><p>From here on out, I’m going to talk about some ways you can give more power to your developers to fix things before they roll out to a production environment.</p><h4>CIS/STIG Scanning</h4><p>Putting the power of CIS/STIG scanning in the hands of your developers will reduce the overhead of scanning and ticketing in production substantially. One way to do this is with OpenSCAP.</p><p>OpenSCAP is an open source project that allows you to validate your system configuration against published benchmarks. The following is the quick howto for Amazon Linux 2023 (just happens to be the system I’m testing right now).</p><p>First, install the packages.</p><pre>yum install openscap openscap-scanner openscap-utils scap-security-guide</pre><p>Next, you’ll want to determine which profile to use.</p><pre>[root@al2023-stig ~]# ls -la /usr/share/xml/scap/ssg/content/<br>total 4920<br>drwxr-xr-x. 2 root root      31 Nov 20 17:00 .<br>drwxr-xr-x. 3 root root      21 Nov 20 17:00 ..<br>-rw-r--r--. 1 root root 5035175 Apr 12  2024 ssg-al2023-ds.xml</pre><p>Amazon Linux appears to only have one benchmark and one profile that is distributed. I could not find the other profiles which are distributed in other major distributions like Ubuntu (I’ll cover this later).</p><p>Now determine which profile to use</p><pre>[root@al2023-stig ~]# oscap info /usr/share/xml/scap/ssg/content/ssg-al2023-ds.xml <br>Document type: Source Data Stream<br>Imported: 2024-04-12T21:21:20<br><br>Stream: scap_org.open-scap_datastream_from_xccdf_ssg-al2023-xccdf.xml<br>Generated: (null)<br>Version: 1.3<br>Checklists:<br> Ref-Id: scap_org.open-scap_cref_ssg-al2023-xccdf.xml<br>  Status: draft<br>  Generated: 2024-04-12<br>  Resolved: true<br>  Profiles:<br>   Title: Standard System Security Profile for Amazon Linux 2023<br>    Id: xccdf_org.ssgproject.content_profile_standard<br>  Referenced check files:<br>   ssg-al2023-oval.xml<br>    system: http://oval.mitre.org/XMLSchema/oval-definitions-5<br>   ssg-al2023-ocil.xml<br>    system: http://scap.nist.gov/schema/ocil/2<br>Checks:<br> Ref-Id: scap_org.open-scap_cref_ssg-al2023-oval.xml<br> Ref-Id: scap_org.open-scap_cref_ssg-al2023-ocil.xml<br> Ref-Id: scap_org.open-scap_cref_ssg-al2023-cpe-oval.xml<br>Dictionaries:<br> Ref-Id: scap_org.open-scap_cref_ssg-al2023-cpe-dictionary.xml</pre><p>The profile we’ll use is</p><pre>xccdf_org.ssgproject.content_profile_standard</pre><p>Now you can do a scan (eval)</p><pre># oscap xccdf eval --profile xccdf_org.ssgproject.content_profile_standard \<br>--report report.html --results results.xml \<br>/usr/share/xml/scap/ssg/content/ssg-al2023-ds.xml</pre><p>After you run this, you’ll get something like this</p><pre>Result  notapplicable<br><br>Title   Verify that System Executables Have Root Ownership<br>Rule    xccdf_org.ssgproject.content_rule_file_ownership_binary_dirs<br>Result  pass<br><br>Title   Verify that Shared Library Files Have Root Ownership<br>Rule    xccdf_org.ssgproject.content_rule_file_ownership_library_dirs<br>Result  pass<br><br>Title   Verify that System Executables Have Restrictive Permissions<br>Rule    xccdf_org.ssgproject.content_rule_file_permissions_binary_dirs<br>Result  pass<br><br>Title   Verify that Shared Library Files Have Restrictive Permissions<br>Rule    xccdf_org.ssgproject.content_rule_file_permissions_library_dirs<br>Result  fail<br><br>Title   Disable Kernel Support for USB via Bootloader Configuration<br>Rule    xccdf_org.ssgproject.content_rule_grub2_nousb_argument<br>Result  fail<br><br>Title   Enable the NTP Daemon<br>Rule    xccdf_org.ssgproject.content_rule_service_chronyd_or_ntpd_enabled<br>Result  pass<br><br>Title   Specify a Remote NTP Server<br>Rule    xccdf_org.ssgproject.content_rule_chronyd_or_ntpd_specify_remote_server<br>Result  fail<br><br>Title   Set SSH Client Alive Count Max<br>Rule    xccdf_org.ssgproject.content_rule_sshd_set_keepalive<br>Result  fail<br><br>Title   Disable SSH Access via Empty Passwords<br>Rule    xccdf_org.ssgproject.content_rule_sshd_disable_empty_passwords<br>Result  pass<br><br>Title   Disable SSH Root Login<br>Rule    xccdf_org.ssgproject.content_rule_sshd_disable_root_login<br>Result  fail</pre><p>The output above is from a default Amazon Linux 2023 image which was updated to the latest at the time of writing.</p><p>Ubuntu has CIS and STIG scanning, but at the time of writing, Ubuntu 24.04 has no available STIG or CIS Level 2 benchmark available (they are not available upstream from CIS or DISA). Additionally, paid support appears to be required to get access to their in-house built tool called “usg”.</p><pre>root@ubuntu-24-stig:~# sudo pro enable usg<br>One moment, checking your subscription first<br>Ubuntu Security Guide is not available for Ubuntu 24.04 LTS (Noble Numbat).<br>Could not enable Ubuntu Security Guide.</pre><p>I’m sure it will eventually come out, but this is a good reason to wait before upgrading to the latest releases.</p><h4>Local Container Scanning</h4><p>There are a few options for local Software Composition Analysis scanning of containers. Snyk, Trivy, and Twistlock all have CLI options to scan.</p><p>Here’s an example scan with Trivy. Snyk and Twistlock have similar CLI scans. With Snyk, you can even scan without a license up to a certain amount. It’s great for one off or infrequent scans.</p><pre>rgil@rem5:~$ trivy image docker.elastic.co/logstash/logstash:7.5.1<br>2024-11-25T14:45:12-05:00 INFO [vulndb] Need to update DB<br>2024-11-25T14:45:12-05:00 INFO [vulndb] Downloading vulnerability DB...<br>2024-11-25T14:45:12-05:00 INFO [vulndb] Downloading artifact... repo=&quot;mirror.gcr.io/aquasec/trivy-db:2&quot;<br>56.32 MiB / 56.32 MiB [-------------------------------------------------------] 100.00% 5.57 MiB p/s 10s<br>2024-11-25T14:45:24-05:00 INFO [vulndb] Artifact successfully downloaded repo=&quot;mirror.gcr.io/aquasec/trivy-db:2&quot;<br>2024-11-25T14:45:24-05:00 INFO [vuln] Vulnerability scanning is enabled<br>2024-11-25T14:45:24-05:00 INFO [secret] Secret scanning is enabled<br>2024-11-25T14:45:24-05:00 INFO [secret] If your scanning is slow, please try &#39;--scanners vuln&#39; to disable secret scanning<br>2024-11-25T14:45:24-05:00 INFO [secret] Please see also https://aquasecurity.github.io/trivy/v0.57/docs/scanner/secret#recommendation for faster secret detection</pre><p>This was a very old logstash container from 4 years ago. I used this to get some good output 😂</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_2qoLAhxm0b62fYZPAFKDg.png" /><figcaption>Credit: Rob Gil</figcaption></figure><p>That’s a spicy scan 😂.</p><h4>Code Configuration Issues and Software Composition Analysis</h4><p>Snyk has a VSCode addon which is quite nice and highlights issues directly in the code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iuK2rrBoNSkfkuYL8TMSSg.png" /><figcaption>Credit: Rob Gil</figcaption></figure><p>This is a simple demo of an Okta authentication with Python/Flask and one of the configuration issues. It’s really handy to see this live as you’re writing code.</p><h4>CI/CD Scanning</h4><p>Vulnerability scanning is traditionally or historically done after release. This creates a number of challenges.</p><ul><li>Vulnerable code in the release</li><li>Ticket sprawl with vulnerability findings</li><li>Context switching to go back and fix code after a vulnerability was ticketed</li></ul><p>Doing Continuous Integration (CI) vulnerability scanning ensures that nothing gets released blindly. Knowing what’s in your code and what the risks are is critical to security. This is a classic “Shift Left” approach that substantially reduces risk.</p><p>All of the tools I mentioned in this article can be run within CI/CD tools. Bonus points if you choose to block merge with Critical and High vulnerabilities.</p><h4>Secure Containers</h4><p>Secure containers is another way to shift left. By giving your engineers and product developers secure containers, they will be ahead of the curve.</p><p>Instead of leaving it to the product developers and engineers to choose containers, help them by providing them secure by default, secure by design, containers.</p><p>Whether you choose Chainguard or RapidFort, you will be in a much better position with minimal containers. This reduces the burden of patching as well as vulnerability management by the sheer fact they are stripped down to the bare minimum. You can read about this in more detail on my other article “<a href="https://medium.com/@rem5/the-dos-and-don-ts-of-containers-0d1bd623a441">The dos and don’ts of containers</a>”.</p><h3>Closing</h3><p>Getting the tools into the hands of developers helps them be “Secure by Default” and “Secure by Design”. It helps reduce the burden on the business. It sets clear expectations between engineering teams and security teams.</p><p>Long story short, don’t hoard security tools.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eeb83e0f5dc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Standalone NAS servers need to go away]]></title>
            <link>https://medium.com/@rem5/standalone-nas-servers-need-to-go-away-f77054add8f8?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/f77054add8f8</guid>
            <category><![CDATA[networking]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[storage]]></category>
            <category><![CDATA[data-center]]></category>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Thu, 21 Nov 2024 20:00:44 GMT</pubDate>
            <atom:updated>2024-11-22T11:43:01.204Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H3RUksX7bWbF7Nid-HX4oA.jpeg" /><figcaption>Credit: Rob Gil — Microdatacenter Project</figcaption></figure><p>With the advent of cloud, network based storage like AWS EBS (Elastic Block Store) and AWS S3 (Simple Storage) have become the standard. But what about at home in your homelab? Are you still re-claiming old computers and rackmounts to use as Network Attached Storage and Archival?</p><p>Old clunky servers are probably the most common approach to home storage. Loud fans, huge power needs, rackmounts or servers sitting on a makeshift rack out of 2x4s. Sound familiar? Before I continue, I fully acknowledge that many of you reading this have recycled your NAS’s in favor of cloud storage. That makes total sense, and that choice was likely driven by the fact that either the server that the NAS was running on or the enclosure was a pain in the ass to manage, both in terms of RAID and in terms of the disk failures and replacements. I’m not going to give you an easy solution, but the rest of this article will dive into detail on how to build a “better” solution for those of you who maintain storage at home for various homelab use cases, archival, etc.</p><p>In addition to clunky old servers, standalone NAS enclosures like Synology and Buffalo are the norm. But these are highly specialized by the companies who put them out and come with all kinds of “<a href="https://thehackernews.com/2024/11/synology-urges-patch-for-critical-zero.html">features</a>” nobody asked for. The underlying architecture (RAID, proprietary enclosures, non scalable storage, etc) for these is old. It’s why everyone has moved to the cloud.</p><p>But what if there was an alternative? If you’re paranoid about cloud providers, need local copies of data for your homelab, or just quick access to large files, there are better options.</p><p>Utilizing multiple, small, low power servers you can overcome the challenges of monolithic NAS solutions. Power usage, fan noise, and RAID need to go. Shifting to a distributed model increases the resiliency and scalability substantially.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H3RUksX7bWbF7Nid-HX4oA.jpeg" /><figcaption>Raspberry Pi multi node cluster</figcaption></figure><p>Typically Raspberry Pis are pretty limited. You either had micro SD cards or USB storage. With the Raspberry 4 (and now 5) there is a PCI bus. This opens the opportunity for higher end storage, but also expands to other mounting options such as M.2.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qsFIrtbbkwbkijZH1IoDcw.jpeg" /></figure><p>As you can see above, the NVMe is on the bottom of the Raspberry Pi connected via M.2. This is one of the node types in my “micro datacenter” project which will be the topic of another post. If you’re interested in these micro servers, you can look at the BOM (bill of materials) on the <a href="https://github.com/robgil/microdatacenter">github page</a>. The intent of these micro servers is to solve the homelab challenges of the past.</p><ul><li>Fanless</li><li>Low Power</li><li>Simple Cabling (Power over Ethernet)</li><li>Standard Mounting</li><li>Standard Enclosures (in my case, DIN rails)</li><li>Something that can sit on my desk or office</li><li>Linear capacity/throughput</li></ul><p>Utilizing multiple micro servers gives you the ability to scale up the network capacity as well as disk capacity. In my cluster above I have 5 nodes with 512G of NVMe each. This can be scaled further if you want slower disk with things like 2.5&quot; USB attached disks. Ultimately what you get by scaling out with low cost nodes, is near linear scalability and greater resilience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*juxk_7ESwLz-K05IJC5mOQ.jpeg" /><figcaption>Credit: Rob Gil — Microdatacenter Project</figcaption></figure><p>This is another way to mount drives. This is a 3D printed DIN mount attached to a 2.5&quot; drive. This makes it super easy to easily rack as many drives as you want on a DIN rail. With USB, they’re hot swappable 😂. I don’t have a picture of this because I’m focusing on NVMe based nodes right now, but you can imagine a row of Raspberry Pis with 2 of these attached to each.</p><p>So if you know about other NAS solutions with Raspberry Pi, you probably know about things like the Radxa Penta HAT, but this is basically the same old NAS design as a Synology or Buffalo.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gm9zHPSsXVfO0Ii0pdPXIg.jpeg" /><figcaption>Credit: Jeff Geerling</figcaption></figure><p>Don’t get me wrong, that hat is super cool, but it creates the same problems I describe above with the added problem of how to mount the thing and power it (12v barrel jack). Jeff Geerling has a fantastic <a href="https://www.jeffgeerling.com/blog/2024/radxas-sata-hat-makes-compact-pi-5-nas">video on the setup and benchmarks</a>.</p><p>If you’ve been waiting patiently and want to know what replaces RAID, it’s a number of options i’ll list below.</p><ul><li><a href="https://min.io/">MinIO</a> (S3 style object store)</li><li><a href="https://ceph.io/en/">Ceph</a> (S3 style object store)</li><li>GlusterFS (Block store)</li><li>OpenEBS (Block store)</li></ul><p>These are just a few examples. The concept is the same. Distributed storage with no single point of failure. Each solution has a slightly different resiliency approach and options, but i’ll use MinIO as an example.</p><p>In MinIO, “<a href="https://min.io/docs/minio/linux/operations/concepts/erasure-coding.html#minio-erasure-coding">Erasure Coding</a>” is how they describe the “write concerns” for objects/files. This describes how many shards of the file or duplicates of the shard should be created.</p><p>GlusterFS on the other hand has a concept of “<a href="https://docs.gluster.org/en/v3/Administrator%20Guide/Setting%20Up%20Volumes/">Volume Replication</a>”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/1*oNkxp-p7XiB4QP-COYklMg.png" /><figcaption>Credit: GlusterFS</figcaption></figure><p>As you can see above, every file is duplicated across servers. This isn’t the most space efficient, but this is essentially your “RAID 1” approach. Now imagine doing this across many more nodes. The risk of data loss trends toward zero. You can also tune how many copies you make and tune the performance of those volumes (more copies means more servers able to respond to read requests).</p><p>Hopefully this helps think about local storage differently. The concepts in this article are examples of skills that are becoming lost with the advent of cloud. To help up and coming engineers learn the skills that underpin cloud services, I’ve created the “<a href="https://github.com/robgil/microdatacenter">microdatacenter project</a>”. If you want to stay up to date on the project, or learn other infrastructure related concepts, you can follow on <a href="https://github.com/robgil/microdatacenter">Github</a> or <a href="https://www.linkedin.com/in/mrrobertgil/">LinkedIn</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f77054add8f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The do’s and don’ts of containers]]></title>
            <link>https://medium.com/@rem5/the-dos-and-don-ts-of-containers-0d1bd623a441?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d1bd623a441</guid>
            <category><![CDATA[security]]></category>
            <category><![CDATA[container-security]]></category>
            <category><![CDATA[docker-image]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Sun, 10 Nov 2024 14:50:28 GMT</pubDate>
            <atom:updated>2024-11-10T15:07:39.415Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*J3kjxHRbkwpeKbB2" /><figcaption>Photo by <a href="https://unsplash.com/@chuttersnap?utm_source=medium&amp;utm_medium=referral">CHUTTERSNAP</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Containers are now well established primitives that everyone uses in one form or another. In this article, I will discuss the desired outcomes for a secure container and secure container pipeline. There are so many pitfalls, and very few articles describing how to truly lock down your containers.</p><p>As I write this, I’m going to make references to various security frameworks including NIST 800–53 and NIST SSDF. There are not a lot of articles out there talking about the link to best practices controls.</p><p>A lot of what I’m going to discuss is ambiguous when it comes to FedRAMP guidance as well as auditor feedback. These are questions that auditors routinely get asked but don’t have guidance for.</p><h3>Patching</h3><p>First, lets discuss patching. If you are in any kind of regulated business, you’ll have a number of clear requirements.</p><ul><li>Hardened (CIS or STIGs)</li><li>Patched (30d for High, 90d for Medium, 120d for Low)</li></ul><p>These are the obvious ones that most engineers understand. But let’s add the other requirements which are less well understood.</p><ul><li><a href="https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-218.pdf">NIST SSDF</a> — The standard for Secure Software Development</li><li><a href="https://www.fedramp.gov/assets/resources/documents/Vulnerability_Scanning_Requirements_for_Containers.pdf">FedRAMP Vulnerability Scanning Requirements for Containers</a> — This is a decent read even if you aren’t doing FedRAMP</li><li><a href="https://www.cisa.gov/news-events/directives/bod-22-01-reducing-significant-risk-known-exploited-vulnerabilities">CISA BOD 22–01: Reducing the Significant Risk of Known Exploited Vulnerabilities</a> — <em>“</em><strong><em>CISA strongly recommends all stakeholders include a requirement to immediately address KEV catalog vulnerabilities as part of their vulnerability management plan. Doing so will build collective resilience across the cybersecurity community.”</em></strong></li><li><a href="https://www.cisa.gov/sites/default/files/publications/CISAInsights-Cyber-RemediateVulnerabilitiesforInternetAccessibleSystems_S508C.pdf">CISA Remediate Vulnerabilities for Internet-Accessible Systems</a> — Critical within 15 calendar days from detection. High, 30 days.</li></ul><p>Patching Service Level Agreements (SLAs) are well understood, except for maybe the CISA guidance which most commercial companies are only starting to be aware of.</p><p>What’s less well understood is that most companies “over-patch” and “under-harden”. This stems from the following mistakes.</p><ul><li>Using Open Source provided containers or project provided containers</li><li>Building from provided Dockerfiles</li><li>Using vendor provided containers</li></ul><p>Let’s talk about each of these in more detail. By the end, it will be painfully obvious what the difference is between a hardened container and a default container. Then you can ask yourself whether you’ll ever use a vendor or project provided container ever again 😂.</p><p><strong>Open Source Provided containers.</strong> These are containers that are built by Open Source Projects. Pick your project, they almost all create containers and push them to dockerhub. What’s wrong with these? Where do I start.</p><ul><li>No CIS or STIG hardening</li><li>Not stripped (has everything and the kitchen sink from the upstream distribution)</li><li>Dockerhub is often not updated regularly</li><li>You’re relying on a project maintainer to update and patch containers</li></ul><p>The thing to remember about these containers is that they are really there for demo purposes. They are not meant for production. That’s up to you to make them production ready. This is not explicitly said. If anyone knows of a project that actually says this, please let me know. I have yet to see it in the wild. At the end of the day, Open Source maintainers are not “suppliers” or “vendors”. I describe this in my <a href="https://www.linkedin.com/posts/mrrobertgil_do-you-treat-open-source-projects-as-vendors-activity-7227362193539805184-2Wy8?utm_source=share&amp;utm_medium=member_desktop">LinkedIn post</a>. Chris Hughes also has a great <a href="https://www.resilientcyber.io/p/supplier-misnomer">blog post</a> about this.</p><p><strong>Building from Dockerfiles</strong> is a similar situation as the above. They’re often built with…</p><pre>FROM alpine<br>-or-<br>FROM debian<br>-or-<br>FROM ubuntu</pre><p>You get the idea. After that, most maintainers just copy the binaries over. Some maintainers do multi stage builds, but most don’t. I’ll go over this later in the hardening recommendations section.</p><p>So what you end up with, is a container with everything and the kitchen sink. All of this gets added to the container, and all of it ends up in your production environment. This is what I mean by “over-patching”. You’re patching tons of stuff you don’t even use. If you’re doing vulnerability scans, you’ll get a ticket for every one of these items that have no business in a container.</p><ul><li>Build tooling (make, pip, gcc, gdb, etc)</li><li>SSH server and client</li><li>C/CPP libraries that aren’t used in Java apps (openssl, etc)</li><li>systemd</li><li>pam</li></ul><p>None of these make sense to be in your containers. On rare occasions you may use an ssh client, but nobody should have an SSH server in a container.</p><p><strong>Vendor Provided Containers. </strong>These come with their own set of challenges. Some Open Source vendors (who offer paid support) only offer dockerhub images. These images are almost never CIS or STIG hardened. Sometimes they have secrets in them. Long story short, don’t trust them. If you can build your own containers with the vendor’s software artifacts, that’s the more secure way of doing it. Vendors are still in this weird haze where they think containers don’t need to be CIS or STIG hardened and are just for “development” testing. This is strongly opinionated, but feel free to show me a vendor container that’s CIS or STIG hardened.</p><p>When it comes to FedRAMP, the Vendor Provided Containers are often treated as appliances. This is far from the reality of containers. Container security accountability is squarely on the Cloud Service Provider, but FedRAMP hasn’t caught up yet. These can still be considered “Vendor Dependencies”.</p><h3>What belongs in containers?</h3><p>Not a whole lot. The bare minimum in fact.</p><ul><li>runtime</li><li>application binaries</li><li>application static assets</li><li>entrypoint (we’ll talk about minimal entry points too)</li></ul><p>Nothing else belongs in there.</p><h3>A list of the most common mistakes</h3><ul><li>Not using FROM scratch or <a href="https://github.com/slimtoolkit/slim?tab=readme-ov-file">Slim</a> to minimize your container</li><li>Including build tools in the final container</li><li>Putting secrets in containers</li><li>Forgetting to CIS/STIG harden the container and application</li><li>Using any container from Dockerhub</li><li>Using containers built from OSS Dockerfiles (these are almost never hardened or minimized)</li><li>Using unmodified Vendor Provided Containers</li></ul><h3>Hardening Guide</h3><p>I do a lot of advisory to some of the biggest companies in the world. This is what I advise them to do.</p><ul><li>Standardize on a single Linux Distribution for all your containers. This is the basis for all the basic libraries and tooling (not to be confused with a “golden image”).</li><li>Ensure the Linux Distribution you choose offers paid support so you can get patches within your SLAs. Do not rely on community support distributions (I won’t call any out directly.. some are better than others, but we want a sure thing)</li><li>Ensure the Linux Distribution you choose supports FIPS if you’re doing or planning to do anything with any government (Yes, FIPS is used beyond the United States)</li><li>Re-build all containers that are distributed on community base containers (alpine, debian, centos, ubuntu, etc) on to your standardized Linux Distribution of choice for all your containers</li><li>Use multi-stage builds such that your final container is stripped to the bare minimum (See “What belongs in containers?”)</li><li>Do not use DockerHub or 3rd party repositories</li><li>Do not use vendor provided containers. Rewrite their provided Dockerfiles and build your own. Vendor provided containers are often not hardened or minimized.</li><li>Build all your containers in your CI/CD pipeline. You need to do this anyway to apply CIS or STIGs. You also need to do this to minimize the images.</li><li>Cryptographically sign your containers (NIST SSDF PS 2.1 and NIST 800–53 SR-9)</li><li>Have a policy to never push containers directly to repositories that haven’t first been through the CI/CD pipeline (NIST 800–53 SR-7 and SR-9 — basically maintain control over your supply chain)</li><li>Ensure all containers are built and scanned for vulnerabilities and secrets in the CI/CD pipeline (Snyk, Twistlock, Wiz, Semgrep, etc) — NIST 800–53 RA-5</li><li>Create a CI/CD template for your teams to follow so they don’t have to figure it out themselves every time</li><li>Use Circle CI Orbs or a centralized build repo to support all the container builds (ensure there is no drift in the build steps for all your containers)</li><li>Ensure SELinux is enabled for the container in CI/CD (STIG and CIS Level 2 Requirement)</li><li>Ensure SELinux policies are defined (STIG and CIS Level 2 Requirement)</li><li>Include your CAs at build time or use mounted CAs in Kubernetes</li><li>Create a Software Bill of Materials for containers (NIST SSDF PS 3.2)</li><li>Use the runtime for the entrypoint instead of bash scripts whenever possible (this bloats the container)</li></ul><p><em>I won’t be discussing runtime security here, just container SDLC. That’s a topic for another article.</em></p><p>If you think that’s a lot of work, it is. Every organization is terrible at this. With that said, there is a company that is making this suck a lot less. <a href="https://www.chainguard.dev/"><strong>Chainguard</strong></a>.</p><h3>Chainguard</h3><p>Minimized, patched, hardened, STIG’d, and FIPS compliant images. What’s not to love?! The images are basically a turnkey swap. If you don’t want to do all of the above, because let’s face it, that costs money too. Spend the money on Chainguard.</p><p>The value proposition is enormous. In addition to everything I mentioned above, they also do the upgrades for you in the same subscription. If you pay for python3 and python4 comes out, Chainguard will build it and it will be part of your existing subscription.</p><p>Do you remember that “offers paid support” part I mentioned? Chainguard can be that partner. The alternative is going with RHEL, Oracle, or Cononical and we all know the struggles that brings, especially given that those are not purpose built for containers and have hard dependencies in the package managers for things like OpenSSL.</p><p>Why knock on RHEL, Oracle, and Canonical? It’s apples and oranges. The big three are all built for hardware. It’s evident in the dependency structure of the packages. They’re designed from the ground up to be run on hardware or VMs with every remote access and IAM tool necessary to do that. It bloats the images substantially, and it forces everyone to use Slim or FROM scratch because they can’t remove packages from the base/minimal OS.</p><p>Knowing all that, there is another vendor that purports to do the same thing. <a href="https://www.rapidfort.com/">RapidFort</a>. I don’t have anything against them per-say, but they basically automated Slim on top of general purpose hardware operating systems. This is fine, but you’ll still be over-patching and over-ticketing. Chainguard did the hard thing by building <a href="https://github.com/wolfi-dev">WolfiOS</a>. This purpose built Linux distribution removes all the cruft that was implemented in the hardware OS images. All those dependencies I mentioned, gone. Think of <a href="https://github.com/wolfi-dev">WolfiOS</a> like building an OS with <a href="https://www.gentoo.org/">Gentoo</a>. Completely from the ground up. The benefits of this go far beyond just the hardening. It improves the performance too.</p><h3>Closing</h3><p>We still live in the wild west. There are no standards for this kind of container security. Nothing in the NIST SSDF or NIST CSF (both of which you should be following). We have an enormous road ahead of us to bring container hardening on par with OS hardening. Container signing is fairly new and poorly supported, where code/package signing has been done for decades. The change of the deployment model has spurred the need for innovation.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d1bd623a441" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Resuscitating the Security Onion]]></title>
            <link>https://medium.com/@rem5/resuscitating-the-security-onion-375271cd990c?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/375271cd990c</guid>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Fri, 23 Dec 2022 17:56:26 GMT</pubDate>
            <atom:updated>2022-12-23T17:56:26.251Z</atom:updated>
            <content:encoded><![CDATA[<p>There’s a theory about security called the “security onion”. Most of you are familiar with this, but for those that aren’t, essentially it is the premise of having layered security.. like layers in an onion.</p><p>So what happened to it? Why is this design approach basically dead? You may be thinking, “oh, Rob, it’s not dead, we all do this”. Do we though?</p><p>Let’s talk about one area where the onion falls apart that everyone uses. API keys. Seriously, how many layers do API keys have? Basically one layer. Most vendors don’t add layers to API keys.</p><p>o No network restrictions to API keys. Once they’re compromised, you can use them anywhere</p><p>o They lack MFA or an additional form of identity. mTLS coupled with an API key for example would be a stronger approach (assuming you keep your private key separate from your API keys)</p><p>o API key rotation is completely non existent in most places. This should be a forced rotation, but it’s simply not a supported paradigm in most frameworks or cloud service providers</p><p>So let’s take the “Onion” concept a step further and modernize this with a few extra controls. Thinking beyond just the number of layers, but also the variation of the layers will substantially improve security. Most of us in the datacenter world have done this for years, but the practice has largely fallen flat due to cloud services offering very limited solutions.</p><p>First concept, make the layers of the Onion multi-vendor. Single vendor VPNs, VDIs, overlay networks, etc just don’t cut it. A single vendor compromise and attackers have a clear path to the prize… customer data. So when you design something like an access solution, use at least 3 vendors and cover at least 3 security paradigms. What do I mean by this?</p><p>For a network access system, choose one vendor for IAM/MFA, use something else for network security (mTLS, ipsec, wireguard, etc), and throw in a jump host for good measure. Now lets count the vendors and layers for this.</p><p>o Vendor 1: IAM/MFA + Device Trust (Mac/Windows)</p><p>o Vendor 2: Network Security (mTLS, IPSec, Wireguard, IP restrictions, etc)</p><p>o Vendor 3: Jump Host (windows/linux/etc) — ssh/rdp</p><p>What does all this do? Forces the bastards to burn no less than 3 zero days. They’d have to break multiple operating systems, network encryption, figure out MFA bypass or theft, and somehow mimic the device to break device trust.</p><p>We can still add more layers on this. A few examples..</p><p>o Dynamic IP restrictions for users of the system (wish there was more of this)<br>o Port Knocking if you’re feeling nostalgic</p><p>Now I went in to some depth for securing the front door, so lets come back to API keys. How much if any of this have you implemented for API keys? Can you even do IP restrictions? mTLS? Geographic restrictions? Automatic Key rotation?</p><p>This is prevalent across cloud providers, especially on the development side. Vendors like GitHub, GitLab, CircleCI, CodeCov, etc. None of them do more than one layer of security on top of their API keys or SSH keys. If credentials are stolen, they’re usable from anywhere with no additional factor. SAML and OAuth are great and all, but they’re only one layer as well unless your SAML/OAuth provider has additional controls like device trust (certificates).</p><p>So if you’ve made it this far, here are some recommendations for improving the security onion and thinking about it in a new way.</p><p>o Ensure you use different vendors for each layer</p><p>o Rethink what a layer is. VPN + IAM is still one vendor when it comes to RCEs. Make sure there are more vendors, not just layers.<br>o Shoot for a design that forces attackers to use no less than 3 0-days</p><p>o Ensure network security (mTLS, IPSec, Wireguard, IP Restrictions) are used in at least one layer of that onion</p><p>With this new lens, you can start re-evaluating whether cloud service providers meet this updated minimum bar. If they don’t, pull the functionality of those services in house where you can add those missing layers on top. Code repositories and CI/CD providers are especially poor at layering security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=375271cd990c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Is it time to dump virtual appliances as a design approach?]]></title>
            <link>https://medium.com/@rem5/is-it-time-to-dump-virtual-appliances-as-a-design-approach-cfda6775d204?source=rss-6d8d39499d2------2</link>
            <guid isPermaLink="false">https://medium.com/p/cfda6775d204</guid>
            <dc:creator><![CDATA[Rob Gil]]></dc:creator>
            <pubDate>Mon, 19 Dec 2022 21:24:17 GMT</pubDate>
            <atom:updated>2022-12-19T21:24:17.243Z</atom:updated>
            <content:encoded><![CDATA[<p>When virtualization came out, virtual appliances were a way to distribute proprietary products. This design around virtual machines also provided a way of delivering a turnkey solution. Something customers could just turn on without going through lengthy configuration or setup. Additionally, those appliances forced the customer to depend on the vendor for support. This promise that vendors made to support these appliances has been broken for decades.</p><p>Ultimately the promise of appliances was never honored. All too often the appliances are lagging behind. They’re an afterthought in the product design and only thought of as a delivery/deployment mechanism. What’s left out is everything that the customer has to do to support this from both an operational and security perspective.</p><p>So how do virtual appliances impact operations? Have you tried updating an appliance? Pick your vendor. You have every challenge in the book. It’s even worse when that vendor is providing virtual appliances that are duplicating the same design as physical hardware. I’ve wrote several blogs and posts about how complexity kills security, but it also kills operations. The complexity of having to work with a virtual appliance that thinks its a physical hardware device is even worse. They take upgrades like a firmware upgrade, require full deprovisioning and failover during upgrades, and often don’t scale past 2 servers in high availability mode. Add to that the struggles with lack of gratuitous arp in cloud service providers, and there are limited options for IP failover scenarios. Cloud is not a datacenter and virtual appliances are a square peg in a round hole when it comes to deploying them in the cloud.</p><p>Some vendors have gotten better with this, but its still painful. Palo Alto added fair support for AWS Gateway Loadbalancer and GENEVE (network overlay). This eliminated the need for Virtual IP addresses and shifted it to the cloud provider. It took the better part of 10 years for this to be possible, but its clear that most vendors still don’t innovate their appliances on cloud services.</p><p>Now let’s talk about the most egregious failures of virtual appliances. Security. How often have you had to manage an appliance and didn’t have root/admin access to scan or harden it? It’s almost a guarantee with most vendors. It’s security through obscurity. What happens when that product has a vulnerability? It takes ages to get a patch from the vendor, when the patch was released by the upstream OS vendor for weeks in many cases. All too often these delays in patches become “Vendor Dependencies” in a FedRAMP Plan of Action and Milestones (list of stuff you need to fix to remain compliant). That’s a fancy way of deferring the responsibility to the vendor you picked, which has zero obligation to meet FedRAMP patching timelines.</p><p>So what are we gaining with virtual appliances? Just headaches if you ask me. We need the industry to move away from this approach so we stop shifting responsibility for security.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cfda6775d204" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>