<?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 Tin Aung Lin on Medium]]></title>
        <description><![CDATA[Stories by Tin Aung Lin on Medium]]></description>
        <link>https://medium.com/@tinaunglinn?source=rss-47337facd11d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*12qI6xtmXVYPqA_EIfyxuQ.jpeg</url>
            <title>Stories by Tin Aung Lin on Medium</title>
            <link>https://medium.com/@tinaunglinn?source=rss-47337facd11d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 07:31:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tinaunglinn/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[How to build a centralized security hub for multicloud in AWS]]></title>
            <link>https://tinaunglinn.medium.com/how-to-build-a-centralized-security-hub-for-multicloud-in-aws-5dbf7574107f?source=rss-47337facd11d------2</link>
            <guid isPermaLink="false">https://medium.com/p/5dbf7574107f</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[id]]></category>
            <category><![CDATA[multi-cloud]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[gcp]]></category>
            <dc:creator><![CDATA[Tin Aung Lin]]></dc:creator>
            <pubDate>Thu, 05 Feb 2026 02:57:54 GMT</pubDate>
            <atom:updated>2026-02-05T02:57:54.284Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s be honest: in an ideal world, we’d use native cloud tools for everything and call it a day. But reality is often messy since we work with teams.</p><p>The use case is very specific and specified. But I think this would be useful for some folks looking to centralize or use a particular IDS hosted in the cloud due to requirements.</p><p>Why do you even do that? Hear me out. Not my two cents, but in case your requirements sound like this, you will read on.</p><h3><strong>You have a “Gold Image” IDS/Firewall</strong></h3><p>Sometimes your organization is married to a specific vendor (think Palo Alto, Check Point, or Fortinet). Whether it’s because the security team knows the CLI like the back of their hand or because you’ve already paid for a massive enterprise license, you <em>must</em> use that specific appliance to inspect your traffic. Building a hub in AWS lets you host that “Gold Image” once and serve all clouds ( in our case, GCP and AWS ).</p><h3>The “Single Pane of Glass” Mandate</h3><p>Your compliance officer doesn’t want to look at AWS GuardDuty logs <em>and</em> GCP Security Command Center logs separately. They want one single stream of truth. By forcing GCP traffic through an AWS-hosted security hub, every single packet, regardless of its home cloud, is logged and inspected by the same set of eyes or team.</p><h3>Costs</h3><p>Let’s face it: licensing a high-end IDS appliance in every single VPC and every GCP project is a great way to set your budget on fire. Centralizing the security muscle in one AWS Hub allows you to scale up (or down) as a single unit, significantly lowering your licensing overhead.</p><h3>The Architecture</h3><p>To centralize security, you insert a transparent inspection layer between your clouds. The <strong>Gateway Load Balancer (GWLB)</strong> makes this possible without re-architecting your entire IP scheme.</p><h3>The Component Stack</h3><ul><li><strong>The Hub:</strong> A dedicated <strong>Inspection VPC</strong> in AWS hosting your IDS fleet or standalone doesn’t matter since we are gonna use target groups anyway.</li><li><strong>The Bridge:</strong> <strong>AWS Transit Gateway (TGW)</strong> connecting your AWS VPCs and the GCP VPN/Interconnect.</li><li><strong>The Star:</strong> <strong>AWS Gateway Load Balancer (GWLB)</strong> and its <strong>Endpoints (GWLBe) </strong>( don’t forget about endpoint setup, otherwise tsgw won’t know where to forward the traffic )</li></ul><h3>Why the Gateway LB is the Key</h3><p>The GWLB is different from a standard Load Balancer because it operates at <strong>Layer 3</strong>. It uses the <strong>GENEVE protocol</strong> to “encapsulate” traffic.</p><p>This is the “secret sauce”: it wraps the original packet in an envelope and hands it to the IDS. The IDS opens the envelope, sees the <strong>original GCP source IP</strong>, inspects it, and hands it back, no NAT, no transparency loss, no headache.</p><h3>The Traffic Flow</h3><ol><li><strong>From GCP:</strong> Traffic enters AWS via the VPN/Interconnect and hits the Transit Gateway.</li><li><strong>The Redirection:</strong> The TGW Route Table has a specific rule: <em>“To reach the destination, you must first go to the GWLB Endpoint.”</em></li><li><strong>The Inspection:</strong> The GWLB spreads the traffic across your IDS appliances. It ensures <strong>stickiness</strong>, meaning the “request” and “response” always hit the same appliance, so the IDS doesn’t get confused.</li><li><strong>Delivery:</strong> Once the IDS gives a thumbs-up, the traffic is returned to the TGW and delivered to its final destination.</li></ol><p>Just don’t forget to set up the TGW in appliance mode. Without this, the return traffic from your app might try to take a different path back to GCP, bypassing the firewall and causing the connection to drop.</p><p>And here is the <strong>diagram.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sSdQlzJhtsEqUYuVnarSKA.png" /></figure><h3>Conclusion: Build Once, Inspect Everywhere</h3><p>Centralizing your security hub in AWS via Gateway Load Balancer isn’t about making the network more complex; it’s about making your <strong>visibility</strong> simpler. By forcing cross-cloud traffic through a single, scalable inspection lane, you satisfy the “Gold Image” IDS requirement without the overhead of fragmented management.</p><p><strong>I intentionally leave all the step-by-step setup because I am lazy, and if you still don’t get the gist after the architecture read-up and don’t know what to do, copy this article and consult with your AI overlords.</strong></p><h3>Final Checklist for the Brave:</h3><ul><li><strong>Validate Flow:</strong> Use VPC Flow Logs to ensure traffic is actually hitting the GWLBe and not “leaking” around the Transit Gateway.</li><li><strong>Test Failover:</strong> Kill one of your IDS instances. If the GWLB doesn’t reroute traffic to a healthy peer in under 10 seconds, your health checks are tuned wrong. ( Trust me this costs me hours )</li><li><strong>Monitor Throughput:</strong> Multicloud inspection adds latency. Measure it.</li></ul><p>If you’ve followed along and your routing tables are set, you now have a unified security posture that treats GCP and AWS as one governed environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5dbf7574107f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Decluttering Your Life Preserves Mental Energy for What Matters]]></title>
            <link>https://tinaunglinn.medium.com/why-decluttering-your-life-preserves-mental-energy-for-what-matters-341a5d4f2b2e?source=rss-47337facd11d------2</link>
            <guid isPermaLink="false">https://medium.com/p/341a5d4f2b2e</guid>
            <category><![CDATA[lifestyle]]></category>
            <category><![CDATA[decision-fatigue]]></category>
            <category><![CDATA[mental-energy]]></category>
            <dc:creator><![CDATA[Tin Aung Lin]]></dc:creator>
            <pubDate>Sat, 31 May 2025 09:13:17 GMT</pubDate>
            <atom:updated>2025-05-31T09:48:59.102Z</atom:updated>
            <content:encoded><![CDATA[<p>The alarm goes off at 6:30 AM. Before you’ve even opened your eyes, the decisions start: Snooze or get up? Coffee or tea? What to wear?</p><p>On the MRT, it continues: Which podcast to listen to? Should you read that bookmarked article or zone out? Stand or sit? Check work emails now or later? Or what anime series to follow up on?</p><p>By the time you reach the office, you’ve already made hundreds of small choices. Each one feels trivial, but here’s what I learned from reading about decision fatigue: they’re all quietly draining your mental energy.</p><p>I read somewhere that our brains burn glucose when making decisions, just like muscles burn energy during exercise. There was a <a href="https://www.pnas.org/doi/10.1073/pnas.1018033108">study </a>about judges who were more likely to deny parole requests later in the day when they were mentally tired. Another one showed that people make worse choices after spending time deciding between too many options.</p><p>Your brain doesn’t know the difference between choosing a podcast and choosing a career move; both use the same mental energy. By the time you need to make decisions that actually matter, you’re running on fumes. And before I was sleeping with a CPAP machine, my mental energy became very limited, I barely had any cognitive resources left for important choices.</p><p>The solution isn’t avoiding all choices, but being smart about which ones deserve your mental energy.</p><h3>The IT Professional’s Daily Decision Hell</h3><p>As IT professionals, we’re especially cursed with this problem. We’re surrounded by tools that can be endlessly customized and optimized, and we convince ourselves that finding the “perfect” setup will make us more productive.</p><p>I used to spend entire afternoons debating which code editor to use, switching between my work and personal laptop for simple tasks, researching the “perfect” mechanical keyboard setup. Then there’s the daily equipment shuffle: which mechanical keyboard should I use today — the tactile one or the Topre one? If I’m on the move, should I grab the iPad or stick with the MacBook? At the office, it’s the office Mac, but at home, maybe the desktop is better for this particular task.</p><p>And once I finally sit down to work? Should I check Jira first, or emails, or maybe Slack has something urgent? Do I need to update my local environment or switch to the Docker setup? Which terminal theme feels right today?</p><p>Each morning becomes this ridiculous decision tree of setups and workflows. I’d burn through my mental energy before writing a single line of code. Meanwhile, the decisions that actually mattered for my career, which skills to learn, which projects to focus on, whether to take that new job opportunity, got whatever mental scraps I had left at the end of the day.</p><p>The irony is brutal: we optimize our tools endlessly while our actual work suffers.</p><h3>What I Did to Save Some Mental Energy (It’s a Work in Progress)</h3><p>I’m not going to pretend I’ve solved this completely. I still catch myself spending way too much time choosing between VS Code extensions or debating monitor setups. But I’ve managed to reclaim some of my decision-making energy by being strategic about where I spend it.</p><p><strong>Personal Life Simplifications:</strong></p><p><strong>Clothing:</strong> I started wearing simple shirts, not extreme like Zuckerberg, but I rotate through free t-shirts I get from conferences and companies. No more standing in front of the closet every morning. I also packed away most of my shoes and chose just one pair for daily wear.</p><p><strong>Gaming schedule:</strong> I adjusted my gaming hours to align with my work schedule. I still consider myself a gamer, but instead of constantly debating “should I game now or focus on work?”, I have set times that don’t conflict with productivity. And no more MMORPGs such as Eve Online and Diablo 4.</p><p><strong>Physical space:</strong> I completely decluttered my desk. Everything has a designated spot, so I’m not constantly deciding where things go or hunting for items.</p><p><strong>Digital Life Boundaries:</strong></p><p><strong>Code Editor Wars I Surrendered:</strong> I was hard-headed about using Neovim for about 3 years (vim before that), but this era of rapid prototyping needs an editor with tons of integrations. I finally switched to VS Code but kept vim keymaps best of both worlds. No more spending hours configuring Neovim plugins or missing out on extensions that would save time.</p><p><strong>Dashboard Consolidation:</strong> I used to have information scattered across multiple dashboards and tools. I started compiling everything into fewer places and built an AI assistant to automate the repetitive aspects. Instead of checking 5 different platforms and deciding “which one should I check first?”, I have one place that aggregates what I need. Now my AI assistant has 21st different MCP functions that talk to like 5 different tools that I use, such as wazuh, Prometheus, Slack, work email, and n8n.</p><p><strong>Setup Consolidation:</strong> I consolidated everything into my personal laptop. No more daily decisions about “should I use the work Mac, office desktop, or personal laptop for this task?” One machine, one environment, one set of configurations. I sold my 16-inch MacBook and switched to a lighter, more portable 14-inch M4. Yes, there are some tradeoffs with screen real estate, but the mental overhead I saved was worth way more than the larger display, and now I never have to decide whether something is “worth carrying the heavy laptop” for.</p><p><strong>Automation over Optimization:</strong> Rather than constantly tweaking my setup for the “perfect” workflow, I focused on automating the repetitive decisions. If I found myself making the same choice repeatedly, I automated it instead of optimizing it. No more obsession with which editor theme ( honestly, I use Homebrew thing all the time ).</p><h3>How to Actually Implement This (Start Small)</h3><p>The key is not to overhaul your entire life at once; that’s just creating more decisions. Start with the lowest-hanging fruit to build momentum, then tackle bigger changes once you feel the benefits.</p><p><strong>The Framework: Pick One Decision Drain and Eliminate It</strong></p><p>Look at your daily routine and identify one decision that you make repeatedly but doesn’t matter much. It could be:</p><p><strong>Your Digital Environment:</strong></p><ul><li>Which code editor to use for different tasks</li><li>Which laptop/device to grab for various work</li><li>When to check Slack/email throughout the day</li><li>Which websites to browse for tech news</li></ul><p><strong>Your Physical Setup:</strong></p><ul><li>What to wear each morning</li><li>Where to put your keys, wallet, and cables</li><li>Which shoes to wear on regular days</li><li>How to organize your desk/workspace</li></ul><p><strong>Your Daily Routine:</strong></p><ul><li>What to eat for breakfast</li><li>Which route to take to work</li><li>What to listen to during a commute</li><li>When to take breaks</li></ul><p><strong>Pick the one that annoys you most or happens most frequently.</strong> Create a simple rule (like “VS Code for everything,” or “same breakfast Mon-Fri,” or “check email at 9 AM and 2 PM only”) and commit to it.</p><p><strong>The 30-Day Rule:</strong> Stick to your rule for 30 days minimum. When your brain says, “But this situation is different,” ignore it. It’s not. The goal isn’t perfection, it’s eliminating one source of mental drain so you can feel the difference.</p><p>Once you’ve proven to yourself that this works with one small change, you can tackle bigger decision drains with confidence.</p><h3>The Reality Check</h3><p>I’m not going to pretend this is some life-changing hack that will solve all your problems. Decision fatigue is real, and you’ll never eliminate it completely. You’ll still catch yourself spending 20 minutes researching the “best” terminal theme or debating whether to switch from Go to Rust for a side project.</p><p>But here’s what I’ve learned: every small decision you can eliminate or automate is mental energy you get back for the choices that actually matter. When I’m not burning cognitive fuel on which laptop to use or what to wear, I have more clarity for architecture decisions, technical tradeoffs, and career moves.</p><p>The goal isn’t to become a robot with no preferences. It’s about being strategic with your limited decision-making capacity. Save your mental energy for debugging complex issues, learning new technologies, and making the technical choices that will actually impact your career and projects.</p><p>Most of us became developers because we love solving interesting problems. The irony is that we often exhaust ourselves on trivial tool decisions before we even get to the interesting stuff.</p><p>Your future self, the one making important technical decisions with a clear head at 4 PM instead of running on cognitive fumes, will thank you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=341a5d4f2b2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Alert and Dashboard Fatigue to AI-Powered Security Analysis]]></title>
            <link>https://tinaunglinn.medium.com/from-alert-and-dashboard-fatigue-to-ai-powered-security-analysis-be7347607cf1?source=rss-47337facd11d------2</link>
            <guid isPermaLink="false">https://medium.com/p/be7347607cf1</guid>
            <category><![CDATA[gemini]]></category>
            <category><![CDATA[sre]]></category>
            <category><![CDATA[siem]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[wazuh]]></category>
            <dc:creator><![CDATA[Tin Aung Lin]]></dc:creator>
            <pubDate>Thu, 22 May 2025 03:20:25 GMT</pubDate>
            <atom:updated>2025-05-22T03:20:46.066Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How I went from avoiding Wazuh dashboards to building an AI assistant</em></p><h3>My Dilemma</h3><p>I’m an SRE, not a security engineer. But like most SREs, security monitoring ended up on my plate anyway. Our team had Wazuh deployed across the platform, a solid open-source SIEM that collects security data from everywhere. The problem? Actually using it.</p><p>Every morning, I’d open the Wazuh dashboard, stare at charts and metrics, and try to figure out what mattered. Should I investigate those authentication failures? What about that network traffic spike? The data was all there, but extracting actionable insights felt like trying to listen to this underwater song in Harry Potter.</p><p>I found myself putting off security reviews, which is exactly what you don’t want when you’re responsible for platform reliability, and security is part of that equation.</p><h3>Lazy Person Approach</h3><p>One Tuesday, after another frustrating session clicking through Wazuh dashboards, I had a realization: What if instead of me hunting through interfaces, the system could tell me what’s important?</p><p>I wanted something that could analyze our security data and have actual conversations about it. “Hey, there were some concerning authentication patterns last night,” instead of me having to discover that buried in dashboard number four.</p><h3>First Attempt:: Langchain</h3><p>Initially, I went with what seemed like the obvious choice — LangChain. I figured I’d use:</p><ul><li>Gemini API (we’re already deep in Google’s ecosystem, and I had API keys available)</li><li>LangChain for building reasoning chains</li><li>Wazuh API for data extraction</li><li>Python to tie it all together</li></ul><p>But I hit two problems immediately.</p><p>First, the <strong>Wazuh API </strong>doesn’t provide the granular access I actually needed. I could get basic alert data, but complex queries, custom time windows, and correlation data, the useful stuff, weren’t easily accessible through their REST endpoints.</p><p>After fighting with API limitations, I realized: why go through Wazuh’s API when the data lives in <strong>OpenSearch</strong> anyway? I could query directly and get exactly what I needed.</p><p>The second problem was worse. I’m watching <strong>LangChain</strong> functions ask Gemini: “What metrics would you like to analyze for security monitoring?”</p><p>I needed to know exactly what functions to call from my opensearch_client.py for the data to use as context. So I make some logic before actually calling the AI to answer my questions. Too many calls and decisions have to be made.</p><p>Here I am trying to build an intelligent system, and I am writing if-else blocks. That’s not intelligence, that’s just expensive autocomplete.</p><h3>Function Calling</h3><p>And thanks to my friend Ye Min Thein, since he shared a <a href="https://ai.google.dev/gemini-api/docs/function-calling?example=meeting#model_context_protocol_mcp">link</a> in Messenger when we were having a conversation about my project, he suggested MCP is a new thing and is reliable, so I decided to switch to that approach.</p><p>I realized I was overcomplicating everything. I don’t need AI to decide what metrics to analyze. I’m the SRE, I know what matters in our environment. I need AI to analyze specific data and tell me what’s happening.</p><p>Enter Gemini 2.0 Flash with function calling and MCP (Model Context Protocol). Instead of complex reasoning chains asking themselves questions, I could give Gemini direct access to exactly the data I cared about through clean function definitions.</p><h3>Building the First Function: Vulnerability Intelligence</h3><p>I started simple. Vulnerabilities are straightforward; they exist, they have severity levels, and they reference CVEs. Perfect first use case.</p><pre>{<br>    &quot;name&quot;: &quot;search_vulnerabilities&quot;,<br>    &quot;description&quot;: &quot;Search for vulnerabilities in the Wazuh index and you can check the field vulnerability.reference for CVE number and then you can analyze the nature of the vulnerability whether it is remotely exploitable or not&quot;,<br>    &quot;parameters&quot;: {<br>        &quot;type&quot;: &quot;object&quot;,<br>        &quot;properties&quot;: {<br>            &quot;severity&quot;: {<br>                &quot;type&quot;: &quot;string&quot;,<br>                &quot;enum&quot;: [&quot;critical&quot;, &quot;high&quot;, &quot;medium&quot;, &quot;low&quot;],<br>                &quot;description&quot;: &quot;Severity level of vulnerabilities (default: high)&quot;,<br>                &quot;default&quot;: &quot;high&quot;<br>            },<br>            &quot;timeframe&quot;: {<br>                &quot;type&quot;: &quot;string&quot;,<br>                &quot;description&quot;: &quot;Time window for search (e.g. 24h, 7d)&quot;<br>            },<br>            &quot;size&quot;: {<br>                &quot;type&quot;: &quot;integer&quot;,<br>                &quot;description&quot;: &quot;Number of results to return (default: 5)&quot;,<br>                &quot;minimum&quot;: 1,<br>                &quot;maximum&quot;: 100,<br>                &quot;default&quot;: 5<br>            }<br>        }<br>    }<br>}</pre><p>This was immediately satisfying. I could ask “show me critical vulnerabilities from the last week,” and Gemini would:</p><ul><li>Parse my natural language request</li><li>Map it to the right parameters (severity: critical, timeframe: 7d)</li><li>Query OpenSearch directly</li><li>Analyze the CVE references and explain which ones were remotely exploitable</li></ul><p>No meta-questions, no generic responses. Just a useful analysis of actual data.</p><h3>Adding Critical Alert Detection</h3><p>With vulnerabilities working well, I added a second capability for high-priority alerts. In our environment, anything above rule level 12 is serious SCP commands being executed, production database deletions, and privilege escalations. The stuff that needs immediate attention.</p><pre>{<br>    &quot;name&quot;: &quot;search_alerts&quot;,<br>    &quot;description&quot;: &quot;Search for high-level security alerts in Wazuh. Alerts with rule level above 12 are considered serious security incidents that require immediate attention.&quot;,<br>    &quot;parameters&quot;: {<br>        &quot;type&quot;: &quot;object&quot;,<br>        &quot;properties&quot;: {<br>            &quot;timeframe&quot;: {<br>                &quot;type&quot;: &quot;string&quot;,<br>                &quot;description&quot;: &quot;Time window for search (e.g. 24h, 7d)&quot;,<br>                &quot;default&quot;: &quot;24h&quot;<br>            },<br>            &quot;min_level&quot;: {<br>                &quot;type&quot;: &quot;integer&quot;,<br>                &quot;description&quot;: &quot;Minimum rule level to include (default: 12)&quot;,<br>                &quot;minimum&quot;: 1,<br>                &quot;maximum&quot;: 15,<br>                &quot;default&quot;: 12<br>            },<br>            &quot;size&quot;: {<br>                &quot;type&quot;: &quot;integer&quot;,<br>                &quot;description&quot;: &quot;Number of results to return (default: 5)&quot;,<br>                &quot;minimum&quot;: 1,<br>                &quot;maximum&quot;: 100,<br>                &quot;default&quot;: 5<br>            }<br>        }<br>    }<br>}</pre><p>Now I had two focused capabilities that actually mattered: vulnerability assessment and critical incident detection. Gemini could correlate between them, connecting vulnerable services with exploitation attempts, or flagging when someone was probing systems we knew had security issues.</p><h3>From Avoidance to Engagement</h3><p>The difference was immediate. Instead of dreading security reviews, I started looking forward to them. I’d ask questions like:</p><ul><li>“What serious stuff happened overnight?”</li><li>“Any critical vulnerabilities that might be getting exploited?”</li><li>“Show me level 12+ alerts from the last few days.”</li></ul><p>And get back actual insights instead of dashboard noise.</p><p>The AI became genuinely helpful at correlating events. It would notice patterns like: “There were three level 12 alerts for unusual process execution on servers that also have high-severity Apache vulnerabilities. The timing suggests possible exploitation attempts.”</p><p>As an SRE, this kind of correlation is gold. I’m not a dedicated security analyst, but I need to understand security impacts on platform reliability. This tool gave me security visibility without requiring me to become a Wazuh expert ( although I consider myself an expert user :P ).</p><h3>Technical Lessons Learned</h3><p>The architecture that worked was surprisingly simple:</p><ul><li>Direct OpenSearch queries for specific security data I cared about</li><li>Gemini 2.0 Flash with function calling to analyze results</li><li>MCP for clean function definitions</li><li>Skip the complex agent frameworks; they add overhead without value</li></ul><p>Key insights that made the difference:</p><p><strong>Don’t ask AI what to analyze: </strong>you’re the domain expert, you know what matters in your environment. Give AI specific data and let it focus on pattern recognition and explanation.</p><p><strong>Function calling beats reasoning chains: </strong>for most practical use cases, direct function access is cleaner than trying to orchestrate complex AI reasoning workflows.</p><p><strong>Start small and focused</strong>: two well-defined functions (vulnerabilities and critical alerts) were infinitely more useful than trying to analyze everything at once.</p><p><strong>Natural language parameter mapping works brilliantly</strong> — Gemini is excellent at translating “show me nasty vulnerabilities from this week” into the right API parameters.</p><h3>Next Step::Active Response Integration</h3><p>The next evolution involves integrating Wazuh’s active response capabilities through additional MCP functions. While I initially bypassed the Wazuh REST API for data queries due to scope limitations, it’s actually well-suited for triggering responses.</p><p>I’m planning to add MCP functions that can execute active responses, like automatically blocking suspicious IPs, isolating compromised hosts, or triggering custom remediation scripts. This would close the loop from detection to response, letting me ask the AI something like “block that IP that’s been brute-forcing SSH” and have it execute the appropriate Wazuh active response command.</p><p>The goal is to expand from passive analysis to active incident response, while maintaining the same clean function-calling approach that made the initial tool so effective. Although it is very sensitive to do these things over AI, you can always add a human in the decision loop. Just adjust your prompt to always ask you back with the decision for this kind of matter.</p><h3>The Bottom Line</h3><p>What started as an SRE’s frustration with security dashboards turned into a genuinely useful AI assistant that makes security monitoring engaging instead of tedious.</p><p>The breakthrough wasn’t using more sophisticated AI techniques it was using simpler, more direct approaches that respected the boundary between human expertise and AI capabilities.</p><p>The future of security monitoring for SREs isn’t about learning more security tools, it’s about building intelligent interfaces that make security data as accessible as your application metrics.</p><blockquote><em>Want to discuss building AI-powered operations tools? Always happy to talk about the intersection of SRE work and practical AI applications.</em></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=be7347607cf1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Be careful when you debug K8s: Your credentials are being logged!]]></title>
            <link>https://medium.com/devsecops-ai/be-careful-when-you-debug-k8s-your-credentials-are-being-logged-fa1f7dd09e94?source=rss-47337facd11d------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa1f7dd09e94</guid>
            <category><![CDATA[kubernetse]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Tin Aung Lin]]></dc:creator>
            <pubDate>Thu, 24 Apr 2025 15:44:39 GMT</pubDate>
            <atom:updated>2025-05-11T06:20:06.752Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey folks, TAL here. I’ve been knee-deep in Kubernetes administration lately and stumbled across something that honestly shocked me, and I thought I’d share it with you all before someone else learns this the hard way.</p><h3>The Surprising Reality of Debug Sessions</h3><p>So here’s the deal: when you’re troubleshooting in Kubernetes and run that familiar command:</p><pre>kubectl run -it my-pod --image=busybox -- sh</pre><p>Everything, and I mean EVERYTHING you type, is captured in the pod’s logs. Your commands, your outputs, those credentials you just typed… all of it. And if you’re using any log collection system like ELK, Splunk, or Fluentbit, guess what? It’s all getting scraped and stored.</p><h3>What’s Happening</h3><p>When you attach to a container using commands like kubectl run -it or kubectl debugYou&#39;re creating an attached session where the stdin/stdout is connected directly to your terminal. What&#39;s not obvious is that this same output stream is being captured in the container logs.</p><p>This means when you do something like:</p><pre>kubectl run -it troubleshoot --image=alpine -- sh<br>/ # curl -u admin:SuperSecr3tP@ssw0rd! https://internal-api<br>/ # export API_KEY=a72bc83deff56789b</pre><p>All those secrets are now permanently etched in your cluster’s logs and potentially accessible to anyone with log viewing permissions. Not great for our security posture, right?</p><h3>Warning Message — Not Enough!</h3><p>Good news: the Kubernetes team recently merged PR #127183 That adds a warning message when you attach to a container:</p><pre>All commands and output executed when attached to a container will be visible via pods/log.</pre><p>But here’s the catch: even with this warning, your commands are STILL being logged! The warning is just that, a warning. It doesn’t change the behavior. And let’s be honest, in the heat of debugging, we often ignore these messages anyway.</p><h3>The Exec vs Attach Distinction</h3><p>Here’s where it gets interesting. When you use kubectl exec to run commands in an existing container, those commands aren&#39;t logged:</p><pre># This way is safe - commands aren&#39;t logged:<br>kubectl exec -it my-existing-pod -- sh<br><br># This way logs everything (even with the new warning):<br>kubectl run -it debug-pod --image=busybox -- sh</pre><p>This distinction is crucial and honestly not widely known in the DevOps community.</p><h3>The Bigger Picture</h3><p>This isn’t just about a single command, it’s about understanding the security implications of our everyday DevOps tools, which is kubectl. As our monitoring and logging systems get more sophisticated, we need to be more careful about what might end up in those logs.</p><p>So next time you’re debugging that stubborn pod issue and about to type a password or token, remember and choose a safer approach!</p><p>What unexpected security gotchas have you discovered in your Kubernetes journey? Don’t say like namespaces are for the weak and deploy everything in default 👐.</p><p>Thanks, TAL</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa1f7dd09e94" width="1" height="1" alt=""><hr><p><a href="https://medium.com/devsecops-ai/be-careful-when-you-debug-k8s-your-credentials-are-being-logged-fa1f7dd09e94">Be careful when you debug K8s: Your credentials are being logged!</a> was originally published in <a href="https://medium.com/devsecops-ai">DevSecOps &amp; AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevSecOps Implementation: A Two-Year Journey to Maturity and Beyond]]></title>
            <link>https://tinaunglinn.medium.com/devsecops-implementation-a-two-year-journey-to-maturity-and-beyond-1f64809fa95e?source=rss-47337facd11d------2</link>
            <guid isPermaLink="false">https://medium.com/p/1f64809fa95e</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[devsecops]]></category>
            <category><![CDATA[sre]]></category>
            <dc:creator><![CDATA[Tin Aung Lin]]></dc:creator>
            <pubDate>Sun, 14 Jan 2024 07:29:41 GMT</pubDate>
            <atom:updated>2024-01-15T01:13:37.881Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vqQIG62OlluTGUk0p_j-BA.png" /><figcaption>photo credit to <a href="https://securestack.com/devsecopsmaturity/">https://securestack.com/devsecopsmaturity/</a></figcaption></figure><p>In today’s digital landscape, where applications are constantly evolving and security threats are ever-present, organizations need to adopt a more proactive approach to application security. DevSecOps, a blend of DevOps and security practices, offers a comprehensive solution by integrating security into the entire software development lifecycle (SDLC).</p><p>Our organization’s top mission is to give reliable and secure services to both our broadband and mobile consumers, we are committed to this journey and beyond.</p><p>By following these steps, organizations can establish a strong DevSecOps foundation, progress toward maturity, and ultimately maximize the benefits of this powerful approach. ( Also note to myself while I am following the same path )</p><p>Year One: Laying the Foundation</p><p>The first year of your DevSecOps journey should focus on establishing a solid foundation. This involves:</p><p><strong>Building a Collaborative Culture</strong>: Foster a culture of security awareness and collaboration among developers, security professionals, and operations teams. Encourage open communication and information sharing to break down silos and promote a shared responsibility for security. Also, it is important to follow Blameless culture. ( read more about this <a href="https://sre.google/sre-book/postmortem-culture/">https://sre.google/sre-book/postmortem-culture/</a> )</p><p><strong>Automating Security Tasks</strong>: Automate routine security tasks such as vulnerability scanning, code analysis, and configuration management. This frees up valuable time for security professionals to focus on more strategic initiatives. In our case, we used Wazuh, OpenVAS, and ELK to automate alerts but covering 100% of the attack surface is hard. ( Wazuh is a really good tool if you can master it and hey it is free <a href="https://wazuh.com/">https://wazuh.com/</a> )</p><p><strong>Implementing Continuous Quality and Security</strong>: Integrate security testing and analysis throughout the SDLC. This includes static code analysis, dynamic application security testing (DAST), and penetration testing. This is the pre-shifting-left process and it is crucial devs see the values in following certain practices. Did used Gitlab Enterprise for this purpose and loved it. Another thing about Gitlab is since its development process is transparent, we can also take part in shaping the product’s future by participating in feature discussions. ( <a href="http://gitlab.com/">http://gitlab.com</a> )</p><p><strong>Establishing Secure Infrastructure Management</strong>: Implement security best practices for infrastructure provisioning, configuration, and orchestration. This includes using infrastructure as code (IaC) tools and employing security controls like access management and logging. Terraform is our choice of IaC although we still need to enforce the coverage to 100% we already benefit from having the auditable infra changes. One honorable mention is teleport since you don’t have to manage multiple ssh keys anymore as well as auditable history. ( <a href="https://goteleport.com/">https://goteleport.com/</a> )</p><p>Year Two: Advancing to Maturity ( Now we are at this stage )</p><p>Once you have a solid foundation, the second year can be dedicated to maturing your DevSecOps practices. This involves:</p><p><strong>Refining Automation</strong>: Optimize and expand your automation efforts to cover a wider range of security tasks. This could include automating security incident response, threat detection, and remediation. And yes some of our pipelines could use an update and scanning should cover 100% of attack surfaces.</p><p><strong>Shifting Left</strong>: Implement “shift left” security practices, where security testing and analysis are integrated earlier in the SDLC. This allows for earlier identification and resolution of vulnerabilities. And yes add SAST and DAST into more pipelines and enforce a deployment policy based on the scanner results.</p><p><strong>Continuous Monitoring and Improvement</strong>: Continuously monitor your DevSecOps processes and metrics to identify areas for improvement. This feedback loop is crucial for ensuring that your practices are effective and evolving to meet the ever-changing threat landscape. We are going to implement not just passive monitoring but something like predicting resource usage from the metrics we have in Prometheus )</p><p><strong>Metrics and Measurement</strong>: Establish key performance indicators (KPIs) to track the progress and effectiveness of your DevSecOps initiatives. This data can be used to demonstrate the value of DevSecOps to stakeholders and guide future investments. And we need to have at least one key SLO implemented this year so that management appreciates the work we have done as a team. ( <a href="https://sre.google/sre-book/service-level-objectives/">https://sre.google/sre-book/service-level-objectives/</a> )</p><p>Beyond Two Years: <strong>Continuous Optimization</strong></p><p>DevSecOps is not a one-time project but rather an ongoing journey of continuous improvement. As our organizations mature, we should continuously refine our practices, adopt new technologies, and adapt to evolving threats.</p><p>This short write-up provides a helpful list of DevSecOps implementation steps for two years to me and hopefully to you as well.</p><p>( This tool can be used to measure your org’s DevSecOpsmaturity level <a href="https://dsomm.owasp.org/">https://dsomm.owasp.org/</a> )</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1f64809fa95e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lazy Kubernetes Administrations]]></title>
            <link>https://tinaunglinn.medium.com/lazy-kubernetes-administrations-767bbf5d9a14?source=rss-47337facd11d------2</link>
            <guid isPermaLink="false">https://medium.com/p/767bbf5d9a14</guid>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Tin Aung Lin]]></dc:creator>
            <pubDate>Sat, 18 Mar 2023 00:01:58 GMT</pubDate>
            <atom:updated>2023-03-18T15:09:44.276Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oDA97S5LimKCSM2qxKReBA.png" /></figure><p>Are you a lazy person? And happened to be working in IT and need to manage some ks8 clusters? Read on.</p><h4>kubectl</h4><p>The most frequently used commands in our everyday life. Make it short. Put this in your .zshrc or .bashrc.</p><pre>alias k=kubectl<br>complete -o default -F __start_kubectl k</pre><p>And lazy people only type part of the command. Mostly they tab them out.</p><pre>source &lt;(kubectl completion zsh)  # set up autocomplete in zsh into the current shell<br>echo &#39;[[ $commands[kubectl] ]] &amp;&amp; source &lt;(kubectl completion zsh)&#39; &gt;&gt; ~/.zshrc # add autocomplete permanently to your zsh shell</pre><h4>namespace</h4><p>Sometimes you might be putting everything in one basket, dev, sit, uat &amp; prod. The params — all-namespace is too long right?</p><pre>k get deployments -A</pre><h4>secret</h4><p>Decoding secrets in one line command is cool but do you know there is a tool that can do it in a more stupid and easy way? Install krew.</p><p><a href="https://krew.sigs.k8s.io/docs/user-guide/setup/install/">https://krew.sigs.k8s.io/docs/user-guide/setup/install/</a></p><p>And then you can do this. Still a little bit long for my taste but hey shorter than the normal one.</p><pre>k krew install view-secret<br>k view-secret your-secret-name -n your-namespace -a</pre><h4>krew urself</h4><p>You know krew also provides a lot of other hacks and here are some that I usually use. Sadly ingress-nginx is unavailable on darwin/arm64.</p><pre>PLUGIN            VERSION<br>ingress-rule      v0.4.0<br>krew              v0.4.3<br>modify-secret     v0.0.43<br>view-cert         v0.0.4<br>view-secret       v0.10.1<br>view-utilization  v0.3.3<br>viewnode          v0.9.1</pre><h4>-v=8</h4><p>Sometimes you just don’t know what api-resources you are hitting since there are a ton of them, you can always append -v=8 to any command you issue and see it for details</p><p>It actually prints the actual API call information for you to inspect.</p><pre>I0318 07:49:35.467857   15569 request.go:1214] Response Body: {&quot;kind&quot;:&quot;APIResourceList&quot;,&quot;apiVersion&quot;:&quot;v1&quot;,&quot;groupVersion&quot;:&quot;networking.gke.io/v1&quot;,&quot;resources&quot;:[{&quot;name&quot;:&quot;serviceattachments&quot;,&quot;singularName&quot;:&quot;serviceattachment&quot;,&quot;namespaced&quot;:true,&quot;kind&quot;:&quot;ServiceAttachment&quot;,&quot;verbs&quot;:[&quot;delete&quot;,&quot;deletecollection&quot;,&quot;get&quot;,&quot;list&quot;,&quot;patch&quot;,&quot;create&quot;,&quot;update&quot;,&quot;watch&quot;],&quot;storageVersionHash&quot;:&quot;VBkvQmd+kPU=&quot;},{&quot;name&quot;:&quot;managedcertificates&quot;,&quot;singularName&quot;:&quot;managedcertificate&quot;,&quot;namespaced&quot;:true,&quot;kind&quot;:&quot;ManagedCertificate&quot;,&quot;verbs&quot;:[&quot;delete&quot;,&quot;deletecollection&quot;,&quot;get&quot;,&quot;list&quot;,&quot;patch&quot;,&quot;create&quot;,&quot;update&quot;,&quot;watch&quot;],&quot;shortNames&quot;:[&quot;mcrt&quot;],&quot;storageVersionHash&quot;:&quot;FD3rYAFSqMY=&quot;}]}</pre><h4>can-i</h4><p>And when it comes to security, don’t be a lazy person ok. Just this one time I ask you. Always check the credentials you gave out whether it is for internal or external use. Always use can-i to check any important verbs otherwise one day you might be missing a node from your production cluster or something worse will happen :3.</p><pre>kubectl auth can-i list secrets --namespace prod --as douche</pre><h4>k9s</h4><p>Do you like top? Meh, I don’t. I prefer htop but of course, gotta live with what you have. For kubernetes I love running k9s pulse on my second screen during peak hours.</p><p><a href="https://k9scli.io/">K9s - Manage Your Kubernetes Clusters In Style</a></p><p>And if you are wondering what it is, check the image on the top.</p><h4>kubens</h4><p>Tired of appending the namespace every time you issue a Kubernetes command? And sometimes you don’t want to see other namespace’s resources like -A then you can use this tool called kubectx and kubens but for me, I use teleport tsh context so mostly I only use kubens.</p><pre>brew install kubectx<br>kubens prod<br>k get pods<br>..... all prod pods .....</pre><p>That’s for today. I may add more hacks to this lazy journal of mine later.</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=767bbf5d9a14" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[BARE METAL-SERVICE STACK AKA nOs]]></title>
            <link>https://tinaunglinn.medium.com/baremetal-service-stack-aka-nos-82facab2dd21?source=rss-47337facd11d------2</link>
            <guid isPermaLink="false">https://medium.com/p/82facab2dd21</guid>
            <category><![CDATA[clive]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[computer-engineering]]></category>
            <category><![CDATA[nix]]></category>
            <category><![CDATA[microservices]]></category>
            <dc:creator><![CDATA[Tin Aung Lin]]></dc:creator>
            <pubDate>Mon, 29 Jan 2018 16:01:44 GMT</pubDate>
            <atom:updated>2019-09-20T08:48:56.890Z</atom:updated>
            <content:encoded><![CDATA[<p>I have been wondering lately about how we are going micro in designing our services out there on the cloud and to what extent we can optimize the performance without making new security risks.</p><p>I am not sure product makers become realized how much it is hard to go micro at the early stage and that’s why they must do it from the start. I will explain why later.</p><p>TLDR: can skip to SEC-4.</p><h3><strong>MICRO IS GOOD</strong></h3><p>Yes, we used to start writing our service business logic models in some single monolithic app-stacks back in the days. That was neat, quick and doesn’t need big and experienced teams instead we can bootstrap a service without any development blockade. Hire one or two and start your development, mentor your team in the process. They grow, you grow.</p><p>But then again, the service grows too fast. Business demands hype up to sky and your team started complaining about how hard it is for them to keep up with new business demands. On the other hand , business is doing great but development and service quality wouldn’t keep up and users not happy ✋.</p><p>Now and then your monolithic stack wouldn’t let your managers producing just a single portion of their features instead they have to wait for others inline or by line.</p><p>What micro and a few human conventions would give you is a free passage from release traffic and make your user happy. That’s why if you plan to run your product for at least a decade or two, you go micro. Well, it is up to you and your resources frankly. But making users not happy is not good for your existence aka your business.</p><h3>STACKS</h3><p>The industry is not always Agile-oriented which means that you don’t have to say agile just because some teams have used it successfully.</p><p>That’s also true for the choice you would make when it comes to choosing your stacks. Some would say <strong>GO</strong> is awesome backed by Google. Some say <strong>PHP</strong> will never die because Facebook uses it. Your users don’t really care about how your technology is <strong>cool</strong> anyway. So you don’t have to be <strong>COOL</strong>.</p><p>You just got to be functional and realistic when it comes to your specific choice. Please read less about how things are going up-hill by other teams instead talk with your peers and see which one they are comfortable with. After all, they are the ones who will help you build your product, not some twitter handles popping up under a tweet you made earlier this evening.</p><h3><strong>HOW MICRO?</strong></h3><p>People think breaking up API calls between inter-services is micro. It is partially true but what you truly want to archive is independent non-persistent service components.</p><p>The persistent layer usually databases and asset stores can be curated in a conventional and independent way to hook up with the nearest upper layer. But the service workers should be working on independent runtime and configuration levels and that way we can bring down service while giving the other one in return.</p><p>I think Instagram and GitHub does that when it comes to their notification and messaging systems. People don’t care about notifications as long as their pull-requests and pushes are working right?</p><p>Now we can go hardware-level micro-services.</p><h3>BARE METAL</h3><p>With today’s engineering talents and resources, people are starting to look beyond what is underlying our services. There are already several appliances for a specific purpose in VOIP and networking industry.</p><p>But why not in our cloud services?</p><p><strong>Nix</strong> took the first daring step and questions everything from ground-up perspectives about how we design cloud services. They took the first shot of stripping down Linux to a functional level and made atomic upgrades and roll-back at OS level possible.</p><p>So check out the <a href="https://nixos.org/nixos/about.html">NIX</a> project and play it with your own hands a day or two. You will see how much it is convenient to have their offerings in your stacks. Nix does talk to metal or you can just simply configure in your virtualization environment like XEN, ESXi as a node.</p><p>But then again and just recently, I spotted a new project, which is probably very experimental and the main purpose of this post, to make myself remember everything about my evening read, is <a href="http://lsub.org/ls/clive.html">CLIVE</a>.</p><p>So <a href="http://lsub.org/ls/clive.html">CLIVE</a> compiled your stack [ currently they support <strong>GO</strong> I guess ] along with other dependencies and run it directly on machines.</p><p>Inter-service calls happen over channels and those channels are bridged over network or PIPEs [ IO ] as you wish. Obviously your query call would only want to talk to PIPEs aka IO while your service routes would love to be bridged in a network interface. Everything is yours doing.</p><p>Now we can go to BAREMETAL-micro!</p><p>Thanks</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=82facab2dd21" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>