llvm-security

Integrate sanitizers and hardening flags into LLVM compilation pipelines.

868|100|Updated Jan 10, 2022
One-click install
npx skills add https://github.com/gmh5225/awesome-llvm-security --skill llvm-security
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: llvm-security
Source: https://github.com/gmh5225/awesome-llvm-security/tree/main/.claude/skills/llvm-security
Command: npx skills add https://github.com/gmh5225/awesome-llvm-security --skill llvm-security

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill helps developers secure LLVM-based compilation pipelines by integrating sanitizers, hardening techniques, and exploit mitigations to reduce memory-safety risks and runtime vulnerabilities.

Core Features & Use Cases

  • Sanitizers: guidance on enabling AddressSanitizer, MemorySanitizer, ThreadSanitizer, and UndefinedBehaviorSanitizer in LLVM-based projects.
  • Hardening Techniques: recommended compiler flags and CI practices for stack protection, control-flow integrity, position independence, and safe-stack usage.
  • Exploit Mitigations: design and implementation tips for return-address protection, pointer authentication, and shadow call stacks.
  • Secure Tooling & Analysis: approaches for type checks, memory safety analyses, and integration with fuzzing and symbolic execution workflows.

Quick Start

Configure a small LLVM project to enable sanitizers, defensive flags, and basic mitigations, then run a quick sanity check to observe sanitizers reporting issues.

Frequently Asked Questions about llvm-security

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enable AddressSanitizer and MemorySanitizer in LLVM compilation pipelines?

To enable sanitizers in LLVM compilation pipelines, you configure specific compiler flags for AddressSanitizer, MemorySanitizer, ThreadSanitizer, and UndefinedBehaviorSanitizer to detect memory-safety risks and runtime vulnerabilities. This integration reduces memory-safety issues during development.

What compiler flags are recommended for LLVM hardening and control-flow integrity?

Recommended compiler flags for LLVM hardening include options for stack protection, control-flow integrity, position independence, and safe-stack usage. Applying these flags within your CI practices mitigates exploitation by protecting stack data and validating execution paths.

Can I implement return-address protection and shadow call stacks using LLVM?

Yes, you can implement return-address protection and shadow call stacks using LLVM. This skill provides design and implementation tips for these exploit mitigations, ensuring your compiled applications defend against control-flow hijacking and runtime vulnerabilities.

How do LLVM sanitizers integrate with fuzzing and symbolic execution workflows?

LLVM sanitizers integrate with fuzzing and symbolic execution workflows through secure tooling and analysis approaches. This integration performs type checks and memory safety analyses, identifying complex vulnerability paths discovered during automated testing.

What is the best way to configure a small LLVM project for basic exploit mitigations?

The best way to configure a small LLVM project for exploit mitigations is to enable sanitizers, apply defensive hardening flags, and run a sanity check. This setup allows you to observe sanitizers reporting issues immediately, validating your security configuration.