Logout in AuthShield was supposed to be straightforward. User clicks logout. Token gets invalidated. Done. Except a JWT cannot be invalidated. It is a signed string. There is nothing to delete. It just keeps working until it expires. That one realization pulled on everything else. If logout needs a blacklist, access tokens need to be short-lived so the blacklist stays small. If tokens are short-lived, users cannot stay logged in without constantly re-authenticating. That means two tokens - a short-lived access token for requests, a long-lived refresh token to silently replace it. But a long-lived refresh token is a theft target. So it rotates on every use. But rotation alone does not stop an attacker who uses the token before the real user does. Token families. Every refresh token belongs to a chain tied to a single login. The moment an already-rotated token is used again, the entire chain is revoked. Attacker and real user both get logged out. Four problems. Each one hiding behind the previous one. Full breakdown with the Python implementation in the blog. Link in the comments 👇 #BackendEngineering #Python #JWT #Security #Authentication #SoftwareEngineering
Ravi Gupta’s Post
More Relevant Posts
-
🚨AlterKS Quarantine Feature Not every suspicious package is malicious. Sometimes you need to investigate. AlterKS has a quarantine feature. It isolates risky packages into a separate virtual environment instead of blocking them outright. alterks quarantine list alterks quarantine inspect <package> <version> alterks quarantine release <package> <version> Your main environment stays clean. Your security team gets time to review. No guesswork. As of v0.3.2, quarantine creates real isolated venvs with full manifest tracking. PyPI: https://lnkd.in/dbw_XEiv GitHub: https://lnkd.in/dT-haNSG Blog post: https://lnkd.in/dx4WzySg #Python #ApplicationSecurity #DeveloperExperience
To view or add a comment, sign in
-
-
🚀 InstapaperScraper v1.3.1rc1 Pre‑Release Try it out today: 👨💻 pip install instapaper-scraper==1.3.1rc1 I’ve just published a new release candidate on PyPI and GitHub, continuing to refine stability and security ahead of the v1.3.1 stable rollout. Highlights: 🔧 Compatibility update – Dropped Python 3.9 (EOL) support. 🔒 Security fix – Prevent path traversal in output filenames. 🔒 API validation – Ensure folder_id and slug values are URL‑safe. ⬆️ Dependency bumps – Updated cryptography, urllib3, and requests to latest versions. 📌 Dev environment – Version numbers added to dev dependencies for consistency. 💬 Share feedback and issues on GitHub to help shape the stable release. #InstapaperScraper #Python #OpenSource #ProductivityTools
To view or add a comment, sign in
-
Some engineer saw the Claude source map leak… and did what engineers do best under pressure: "so I did what any engineer would do under pressure: I sat down, ported the core features to Python from scratch, and pushed it before the sun came up." 🙃 😎 🚀 The result is a clean-room Python rewrite that captures the architectural patterns of Claude Code's agent harness without copying any proprietary source. But this opens up a much bigger question: If you discover source code, and use one or more LLMs to recreate or port it into another language… Who actually owns the result? The original authors of the leaked code? The engineer who re-implemented it? The LLM that helped translate it? Or is it legally “clean” because no code was copied? Anthropic confirmed the incident as “a release packaging issue caused by human error, not a security breach.” Worth noting: this is the second time it’s happened, a nearly identical source map leak occurred with an earlier version in February 2025. One more thing for anyone who updated Claude Code via npm that morning: a separate supply-chain attack on the axios package was active between 00:21 and 03:49 UTC the same day. Axios is a Claude Code dependency. If you updated during that window, audit your dependencies and rotate credentials.
To view or add a comment, sign in
-
-
🛡️ Scanning Isn’t a Tool. It’s a Technique. In my previous posts, I automated reconnaissance using Nmap. But this time, I challenged myself: 👉 Can I build a scanner from scratch? So I did — using only Python’s socket module. No shortcuts. 🧠 What I implemented: ✔ Manual TCP connection scanning ✔ Multi-threaded port discovery ✔ Banner grabbing for service fingerprinting ✔ Structured JSON logging ✔ Robust error handling (timeouts, unreachable hosts) And this changed how I think about security. Because now I don’t just see: “Port 80 is open” I understand: “How that connection is established” “What the service returns” “How detection could work” 🚨 Real defensive value: • Validate firewall rules • Detect unexpected services • Support incident response • Build lightweight internal scanners This is the shift: From using tools → to building them. And that’s where real blue-team capability starts. 📌 Full implementation available in my GitHub https://lnkd.in/gyZqM2Hd More defensive tooling coming soon. #CyberSecurity #BlueTeam #Python #SOC #ThreatDetection #SecurityAutomation #DefensiveEngineering
To view or add a comment, sign in
-
Critical vulnerability CVE-2026-5752 in Terrarium sandbox risks root access. Terrarium, a Python sandbox in Docker containers, suffers JavaScript prototype traversal flaw. Exploitation allows sandbox escape and root code execution on host. This affects any organization running untrusted code in containers. Attackers can access sensitive files and pivot across container networks. Mitigate by disabling code submissions, segmenting networks, deploying WAFs, monitoring containers, restricting access, managing containers securely, and updating dependencies.
To view or add a comment, sign in
-
Server-side logs only tell half the security story. The other half lives in the wire traffic your application never reports on. I just published a walkthrough on using mitmproxy as a scriptable security regression harness. Not packet inspection for its own sake; a programmable test layer that automates what you would otherwise do manually. The Python addon I built does three things: - Flags missing security headers on every response - Detects bearer tokens leaking in query strings - Simulates a hostile network by stripping HSTS You can build the whole harness in 30 minutes on a local proxy. I also cover where it breaks down: certificate pinning, HTTP/2 multiplexing, and QUIC paths are real constraints you will hit. If you are responsible for proving your security controls actually work, not just assuming they do, this might be useful. Have you ever caught something in wire traffic that your server logs completely missed? https://lnkd.in/d2_JzW3V
To view or add a comment, sign in
-
-
: 🎯 From Scripts to Systems Today marks a major shift in my Python journey. I moved beyond writing one-time scripts and built my first Continuous Security Terminal. Instead of the program running and immediately closing, I implemented an Infinite Menu System that stays active, processes user commands, and manages security states in real-time. What I built today: ✅ The "While True" Loop: Created a persistent environment that only closes when the "Shut Down" command is given. ✅ Multi-Feature Menu: Integrated login security, system status reports, and a graceful exit sequence. ✅ Password Strength Integration: Linked yesterday's logic to the login portal—if your password isn't "industry standard," the terminal rejects your access. ✅ The Time Module: Added time.sleep to simulate a realistic system boot and shutdown experience. Key takeaway: Coding isn't just about solving a math problem; it's about building an experience for the user. Seeing my logic loop back and wait for my next command feels like a huge win. The logic is getting deeper, and the tools are getting sharper. #Python #CyberSecurity #CodingJourney #SoftwareEngineering #VSCode #TechCommunity #BuildInPublic
To view or add a comment, sign in
-
-
Your Dockerfile's FROM line is a trust decision. 🔐 A developer using Label Studio just opened a GitHub issue asking the team to swap their python base image for Docker Hardened Images (DHI) after repeatedly hitting vulnerabilities in image scans. It's a pattern I see constantly: → Team builds a great app → Base image carries hidden CVEs → Security scan fails → Everyone scrambles The fix? Start from a hardened base. DHI ships with a minimal attack surface, no unnecessary packages, and regular security updates baked in. And since earlier this year, it's free under Apache 2.0. Small Dockerfile change. Big security posture improvement. 🔗 See the issue: https://lnkd.in/gQ8YNnJx #ContainerSecurity #Docker #DHI #DevSecOps #DockerHardenedImages #Kubernetes
To view or add a comment, sign in
-
The Claude sandbox can't make outbound API calls to third-party services. This matters if you're building skills that connect to external platforms. Here's what's actually happening: the sandbox proxy blocks outbound HTTPS to domains like betterproposals.io. Curl fails. Python requests fail. The error looks like a credentials problem — it's a network one. The fix: use Claude in Chrome instead. Navigate to the API's domain, then execute the fetch call as JavaScript from within that browser tab. Same-origin rules mean the request goes through. We discovered this the hard way building the DMQ Proposal Builder. The whole skill design changed once we understood the constraint. Most API integration failures in Claude aren't authentication problems. They're network architecture problems. Know which one you're debugging before you start.
To view or add a comment, sign in
-
Stop memorizing IP addresses. 🛑 I got tired of typing ssh root@192.1xx.xx.xxx from memory every time I needed to check a server. So, I built ssh-to-server — a tiny CLI tool that turns your SSH config into an interactive menu. Why use it? 📂 Zero Config: It automatically reads your existing ~/.ssh/config. ⌨️ Interactive UI: Pick a server using arrow keys or quick number shortcuts. 🛠️ Respects your setup: Works with your IdentityFile, custom ports, and proxy jumps. Is it revolutionary? No. Does it save me from 20 daily typos? Absolutely🤓 Built with Python, Click, and a healthy dose of terminal customization procrastination. 📦 Install it: uv tool install ssh-to-server (or pip install ssh-to-server) 🔗 GitHub: https://lnkd.in/eh--kjfZ If your SSH config is longer than your shopping list, this one's for you. 🤝 #Python #DevOps #CLI #OpenSource #Productivity
To view or add a comment, sign in
-
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development
Here is the full Phase 2 deep dive 👇 https://dev.to/ravigupta97/i-thought-jwts-were-stateless-turns-out-logout-made-me-build-a-stateful-layer-anyway-48nd JWTs, logout, Redis blacklisting, the two-token strategy, refresh token rotation, and token family reuse detection - the complete token security implementation in AuthShield. GitHub: https://github.com/ravigupta97/authshield