kernel-security

kernel-security is a skill for Claude Code, Codex from mohitmishra786/low-level-dev-skills. It costs 84 tokens per session (1,810 once invoked), scanned B, original, MIT.

A guide to securing Linux at the kernel boundary. It covers access-control policies, system-call filters, memory protections, sanitizers, and kernel vulnerability triage.

In plain words
What is it for?
Use it to write SELinux or AppArmor policies, sandbox processes with seccomp, enable hardening features, use kernel sanitizers, and assess kernel CVEs.
Why use it?
It helps restrict what programs can do and investigate weaknesses in the operating system or its applications.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write SELinux or AppArmor policies, sandbox processes with seccomp, enable hardening features, use kernel sanitizers, and assess kernel CVEs.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mohitmishra786/low-level-dev-skills/kernel-security
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add mohitmishra786/low-level-dev-skills --skill kernel-security
Clone the repo
git clone --depth 1 https://github.com/mohitmishra786/low-level-dev-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for kernel-security

README.md
[![agentmods](https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/kernel-security/github.svg)](https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/kernel-security)
Your own site
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/kernel-security"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/kernel-security/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for kernel-security

Your own site · 80×15
<a href="https://agentmods.dev/skills/mohitmishra786/low-level-dev-skills/kernel-security"><img src="https://agentmods.dev/badge/skills/mohitmishra786/low-level-dev-skills/kernel-security.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 84 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,810 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00084 $0.01810
Opus 5.5 $0.00034 $0.00724
Sonnet 5.5 $0.00017 $0.00362
Haiku 4.5 $0.00008 $0.00181

Measured 14d ago against content hash a83d9364b13f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

kernel-security scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 14d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Reaches for credential filesmediumPrivilege escalation

SSH keys, cloud credentials, git-credentials, .npmrc, /etc/shadow: reading these is how a config file becomes a credential leak.

deny /etc/shadow r,

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

skills/security/kernel-security/SKILL.md · 251 lines

How it starts

The opening of the file, as written. The whole thing — 251 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Kernel Security

Purpose

Guide agents through Linux kernel security: LSM frameworks (SELinux, AppArmor), seccomp-bpf with libseccomp, KASLR and bypass mitigations, Intel CET (Shadow Stack + IBT), ARM PAC and BTI, kernel sanitizers (KASAN, KMSAN), and CVE triage for kernel vulnerabilities.

Triggers

  • Writing SELinux or AppArmor policies for confined services
  • Sandboxing processes with seccomp-bpf filters
  • Hardening binaries with CET, PAC, or BTI
  • Enabling KASAN on kernel builds for vulnerability research
  • Triaging kernel CVE impact on your distro/kernel version
  • Designing container or microservice security boundaries

Workflow

1. LSM framework overview

Application syscall
    → DAC (uid/gid, file mode)
    → LSM hook (SELinux/AppArmor/Yama/...)
    → Capability check
    → seccomp filter
    → Kernel
# Active LSM
cat /sys/kernel/security/lsm
# common: lockdown,capability,yama,apparmor,safesetid

2. SELinux policy

# Check SELinux status
getenforce
sestatus

# Context of file/process
ls -Z /usr/sbin/nginx
ps -eZ | grep nginx

# Audit denials
ausearch -m avc -ts recent
sealert -a /var/log/audit/audit.log

Policy module example:

# myapp.te
policy_module(myapp, 1.0.0)

type myapp_t;
type myapp_exec_t;
type myapp_log_t;

init_daemon_domain(myapp_t, myapp_exec_t)

allow myapp_t myapp_log_t:file { create write append open };
allow myapp_t self:tcp_socket { create bind listen accept };
checkmodule -M -m -o myapp.mod myapp.te
semodule_package -o myapp.pp -m myapp.mod
semodule -i myapp.pp

3. AppArmor profiles

# Generate complain-mode profile
aa-genprof /usr/bin/myapp

# Enforce
aa-enforce /etc/apparmor.d/usr.bin.myapp

# Check status
aa-status
# /etc/apparmor.d/usr.bin.myapp
#include <tunables/global>

/usr/bin/myapp {
  #include <abstractions/base>

  /usr/bin/myapp mr,
  /var/log/myapp.log w,
  /etc/myapp/config r,
  network bind tcp,
  deny /etc/shadow r,
}

Read the full file on GitHub · 251 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 14d ago Changed · +3 lines a83d9364b13f
  2. 3mo ago First seen · 248 lines · 84 tokens per session scan B e2c8d60f024c

Subscribe to this mod's changes

kernel-security is a skill published in the GitHub repository mohitmishra786/low-level-dev-skills (310 stars, last pushed 14d ago), licensed MIT. It adds 84 tokens to every session and 1,810 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it B with 1 finding (reaches for credential files). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

kernel-security compared with skills from other repositories

kernel-security next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
kernel-securitymohitmishra786/low-level-dev-skillsSkill31014d agoMITB84Claude Code, Codex
ecommerce-marketing-strategy-buildernexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA112Claude Code, Codex
product-description-generatornexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA126Claude Code, Codex
shopify-marketingnexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA60Claude Code, Codex
tiktok-shop-cross-bordernexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA55Claude Code, Codex
ecommerce-landing-pagenexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA45Claude Code, Codex
market-gap-analysisnexscope-ai/eCommerce-SkillsSkill1.6ktodayMITA38Claude Code, Codex