When researchers analyzed how Pegasus spyware infected iPhones without the user tapping anything, they found something wild. The attackers sent an iMessage with a fake GIF that targeted Apple's image decompression engine. The decompression math was so flexible that the exploit

Microsoft Threat Intelligence has observed threat actors using agentic AI tools to search public GitHub repositories for exposed secrets and then using stolen secrets for further malicious activity against the compromised organization.

Searching open

Chrome 157 fixes 213 security issues, 7 of them critical.

Two hundred and thirteen is a lot of anything.

The browser is the most patched piece of software most people own. And it's still not enough.

Application Security & DevSecOps Agents

Problem Statement

Serverless functions (AWS Lambda, Azure Functions) are often created with overly broad IAM execution roles (e.g., Resource: "*"), leaving them vulnerable to event injection attacks and cloud resource abuse.

Goal

Deploy an agent that analyzes serverless function code alongside execution role policies to enforce least-privilege permissions.

Outcome Measurement

  1. Permission Reduction: 90% reduction in overly broad IAM permissions assigned to serverless execution roles.
  2. Code Safety: Zero undetected event injection vulnerabilities in scanned functions.

How the Code was Built

Analyzes serverless handlers for dynamic evaluation flaws while mapping required SDK calls to IAM actions.

Executable Code

from pydantic import BaseModel, Field
from langchain_openai import ChatOpenAI
class ServerlessAudit(BaseModel):
function_name: str
event_injection_risk: bool
overprivileged_permissions: list[str]
minimal_iam_policy: str
def audit_serverless_function(function_code: str, iam_role_policy: str) -> ServerlessAudit:
llm = ChatOpenAI(model="gpt-4o", temperature=0)
structured_llm = llm.with_structured_output(ServerlessAudit)
prompt = f"""
Audit Serverless Function Code and Assigned IAM Policy:
CODE:
{function_code}
IAM POLICY:
{iam_role_policy}
Identify event injection flaws and output least-privilege IAM policy.
"""
return structured_llm.invoke(prompt)
if __name__ == "__main__":
code = "import boto3\ndef lambda_handler(event, context):\n s3 = boto3.client('s3')\n s3.download_file(event['bucket'], event['key'], '/tmp/out')"
policy = '{"Statement": [{"Effect": "Allow", "Action": "s3:*", "Resource": "*"}]}'
res = audit_serverless_function(code, policy)
print(f"Injection Risk: {res.event_injection_risk}")
print(f"Excessive Rights: {res.overprivileged_permissions}")
print("Minimal Policy:\n", res.minimal_iam_policy)

Leave a Reply

Trending