Posts

Showing posts with the label Source

Claude Code Hooks: The Deterministic Security Layer Your AI Agent Needs

Claude Code Hooks: The Deterministic Security Layer Your AI Agent Needs > APPSEC_ENGINEERING // CLAUDE_CODE // FIELD_REPORT Claude Code Hooks: The Deterministic Security Layer Your AI Agent Needs CLAUDE.md rules are suggestions. Hooks are enforced gates. exit 2 = blocked. No negotiation. If you're letting an AI agent write code without guardrails, here's how you fix that. // March 2026 • 12 min read • security-first perspective Why This Matters (Or: How Your AI Agent Became an Insider Threat) Since the corporate suits decided to go all in with AI (and fire half of the IT population), the market has changed dramatically, let's cut through the noise. The suits in the boardroom are excited about AI agents. "Autonomous productivity!" they say. "Digital workforce!" they cheer. Meanwhile, those of us who actually hack things for a living are watching these agents get deployed with shell access, API keys, and service-l...

🛡️ Claude Safety Guide for Developers

Claude Safety Guide for Developers (2026) — Securing AI-Powered Development Application Security Guide — March 2026 🛡️ Claude Safety Guide for Developers Securing Claude Code, Claude API & MCP Integrations in Your SDLC 📑 Contents Why This Guide Exists The AI Developer Threat Landscape in 2026 Real-World CVEs: Claude Code Vulnerabilities Understanding Claude Code's Permission Model Prompt Injection: Attack Vectors & Defences MCP (Model Context Protocol) Security AI Supply Chain Risks Claude API Safety Best Practices Claude Code Hardening Checklist Integrating Claude Security into CI/CD Compliance Considerations (SOC 2, GDPR, AI Act) Resources & References 1. Why This Guide Exists AI-powered development tools have moved from novelty to necessity. Anthropic's Claude ecosystem — spanning Claude Code (terminal-based agentic coding), Claude API (programmatic integration), and the broader Model Context Protocol (MCP) integrati...

PHP Source Code Chunks of Insanity (Delete Post Pages) Part 4

Intro  This post is going to talk about source code reviewing PHP and demonstrate how a relatively small chunk of code can cause you lots of problems. The Code In this article we are going to analyze the code displayed below. The code displayed below might seem innocent for some , but obviously is not. We are going to assume that is used by some web site to delete posts from the logged in users securely. <?php require_once 'common.php'; validatemySession(); mydatabaseConnect(); $username = $_SESSION['username'];// Insecure source $username = stripslashes($username);// Improper filtering $username = mysql_real_escape_string($username);//Flawed function // Delete the post that matches the postId ensuring that it was created by this user $queryDelete = "DELETE FROM posts WHERE PostId = " . (int) $_GET['postId']. " AND Username = '$username'"; if (mysql_query($queryDelete))// Bad validation co...

PHP Source Code Chunks of Insanity (Post Pages) Part 3

Intro  This post is going to talk about source code reviewing PHP and demonstrate how a relatively small chunk of code can cause you lots of problems. The Code In this article we are going to analyze the code displayed below. The code displayed below might seem innocent for some , but obviously is not. We are going to assume that is used by some web site to post the user comments securely. <?php require_once 'common.php'; validateMySession(); ?> <html> <head> <title>User Posts</title> </head> <body> <h1>Showing current posts</h1> <form action='awsomePosts.php'> <p>MySearch: <input type='text'  value='<?php if (isset($_GET['search'])) echo htmlentities($_GET['search'])?>'></p> <p><input type='submit' value='MySearch'></p> </form> <?php showAwsomePosts();?> ...