Live survey304 models · 14 providers · 23,592 auditsAudited implement · SAFE →What changedHow we verifyllms.txt

Agent skill · Audited from source

Perl Security

skill · affaan-m/ECCMIT licenceAudited 21 Sep 2026 · source 649b2d7452eb

★ 263,919pushed today
✓SAFEGrade B · 89/100 · 21 Sep 2026 · 649b2d7
263,919repo stars · whole affaan-m/ECC

Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 649b2d7452eb and found no filesystem, network or shell access and no hard-coded secrets. What it does: テイントモード、入力バリデーション、安全なプロセス実行、DBIパラメータ化クエリ、Webセキュリティ(XSS/SQLi/CSRF)、perlcriticセキュリティポリシーを網羅する包括的なPerlセキュリティ。

Ask an AI about this pageGChatGPTCClaudePPerplexityGeGeminiXGrok
More
Cite

Cite this page

ModelsAtlas. “Perl Security (affaan-m/ECC)”. Retrieved 21 Sep 2026. https://modelsatlas.com/skills/affaan-m/perl-security

Trust audit

Audit 0.4.1 · source read 21 Sep 2026

Trust score89/100✓SAFE B
0 critical0 high0 medium0 low0 info

SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.

What the source does

  • FilesystemNone observedNo reads or writes in the source
  • NetworkNone observedNo outbound calls in the source
  • ShellNone observedNo commands run in the source
  • DependenciesPinnedNothing floats
  • SecretsNone foundNo keys in source

Five audit layers

LayerWhat we checkResultFindings
L0 ProvenanceRepo owner, licence, archive status, activityPASS0
L1 Static sourceSecrets, path traversal, supply chain, hidden codeNA0
L2 InstructionsPrompt injection, authority framing, hidden directivesPASS0
L3 InventoryThe files and declarations match the sourcePASS0
L4 SandboxRun in isolation and watch behaviourSKIPPED why0

Gates applied: no behavioural pass.

Findings (0)

No findings at any severity. We re-audit when the source changes.

Audit 0.4.1 · source sha 649b2d7452eb · 21 Sep 2026Report an issue or request a re-scan

Provenance

Who published it, and what the verdict is pinned to

  • Publisheraffaan-m GitHub userOwner of the repository this skill is read from
  • Source folderaffaan-m/ECC/docs/ja-JP/skills/perl-securityThe exact folder we audited
  • LicenceMITAs the repository states it
  • Commit pinned for this verdict649b2d7452ebA new audit runs when the source changes
  • Repository statusNot archivedPushed today
  • Sandboxed runNot runSkills are read, not executed; layer L4 is skipped

What it tells the agent

Full source on GitHub ↗

Its description: テイントモード、入力バリデーション、安全なプロセス実行、DBIパラメータ化クエリ、Webセキュリティ(XSS/SQLi/CSRF)、perlcriticセキュリティポリシーを網羅する包括的なPerlセキュリティ。

---
name: perl-security
description: テイントモード、入力バリデーション、安全なプロセス実行、DBIパラメータ化クエリ、Webセキュリティ(XSS/SQLi/CSRF)、perlcriticセキュリティポリシーを網羅する包括的なPerlセキュリティ。
origin: ECC
---

# Perlセキュリティパターン

入力バリデーション、インジェクション防止、セキュアコーディングプラクティスを網羅するPerlアプリケーションの包括的なセキュリティガイドライン。

## アクティベートするタイミング

- Perlアプリケーションでユーザー入力を処理するとき
- PerlのWebアプリケーション(CGI、Mojolicious、Dancer2、Catalyst)を構築するとき
- セキュリティ脆弱性についてPerlコードをレビューするとき
- ユーザー指定パスでファイル操作を実行するとき
- PerlからシステムコマンドをExecuteするとき
- DBIデータベースクエリを書くとき

## 仕組み

テイント対応の入力境界から始め、次に外側に移動する: 入力をバリデートしてアンテイントし、ファイルシステムとプロセス実行を制約内に保ち、どこでもパラメータ化されたDBIクエリを使用する。以下の例は、ユーザー入力、シェル、またはネットワークに触れるPerlコードをリリースする前に適用することが期待されるデフォルトを示す。

## テイントモード

Perlのテイントモード(`-T`)は外部ソースからのデータを追跡し、明示的なバリデーションなしに安全でない操作で使用されることを防ぐ。

### テイントモードの有効化

```perl
#!/usr/bin/perl -T
use v5.36;

# テイントされた: プログラム外からのもの
my $input    = $ARGV[0];        # テイントされた
my $env_path = $ENV{PATH};      # テイントされた
my $form     = <STDIN>;         # テイントされた
my $query    = $ENV{QUERY_STRING}; # テイントされた

# PATHを早期にサニタイズ(テイントモードで必要)
$ENV{PATH} = '/usr/local/bin:/usr/bin:/bin';
delete @ENV{qw(IFS CDPATH ENV BASH_ENV)};
```

### アンテイントパターン

```perl
use v5.36;

# Good: 特定の正規表現でバリデートしてアンテイント
sub untaint_username($input) {
    if ($input =~ /^([a-zA-Z0-9_]{3,30})$/) {
        return $1;  # $1はアンテイントされている
    }
    die "Invalid username: must be 3-30 alphanumeric characters\n";
}

# Good: ファイルパスをバリデートしてアンテイント
sub untaint_filename($input) {
    if ($input =~ m{^([a-zA-Z0-9._-]+)$}) {
        return $1;
    }
    die "Invalid filename: contains unsafe characters\n";
}

# Bad: 過度に許可的なアンテイント(目的を無効化する)
sub bad_untaint($input) {
    $input =~ /^(.*)$/s;
    return $1;  # 何でも受け入れる — 無意味
}
```

## 入力バリデーション

### ブロックリストよりアローリスト

```perl
use v5.36;

# Good: アローリスト — 許可されるものを正確に定義
sub validate_sort_field($field) {
    my %allowed = map { $_ => 1 } qw(name email created_at updated_at);
    die "Invalid sort field: $field\n" unless $allowed{$field};
    return $field;
}

# Good: 特定のパターンでバリデート
sub validate_email($email) {
    if ($email =~ /^([a-zA-Z0-9._%+-]+\@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,})$/) {
        return $1;
    }
    die "Invalid email address\n";
}

sub validate_integer($input) {
    if ($input =~ /^(-?\d{1,10})$/) {
        return $1 + 0;  # 数値に強制変換
    }
    die "Invalid integer\n";
}

# Bad: ブロックリスト — 常に不完全
sub bad_validate($input) {
    die "Invalid" if $input =~ /[<>"';&|]/;  # エンコードされた攻撃を見逃す
    return $input;
}
```

### 長さ制約

```perl
use v5.36;

sub validate_comment($text) {
    die "Comment is required\n"        unless length($text) > 0;
    die "Comment exceeds 10000 chars\n" if length($text) > 10_000;
    return $text;
}
```

## 安全な正規表現

### ReDoS防止

壊滅的なバックトラッキングは重複するパターンにネストされた量詞が使用されるときに発生する。

```perl
use v5.36;

# Bad: ReDoSに脆弱(指数的バックトラッキング)
my $bad_re = qr/^(a+)+$/;           # ネストされた量詞
my $bad_re2 = qr/^([a-zA-Z]+)*$/;   # クラスにネストされた量詞
my $bad_re3 = qr/^(.*?,){10,}$/;    # 繰り返される貪欲/怠惰な組み合わせ

# Good: ネストなしで書き直す
my $good_re = qr/^a+$/;             # 単一の量詞
my $good_re2 = qr/^[a-zA-Z]+$/;     # クラスに単一の量詞

# Good: バックトラッキングを防ぐためにpossessive量詞またはアトミックグループを使用
my $safe_re = qr/^[a-zA-Z]++$/;             # Possessive (5.10+)
my $safe_re2 = qr/^(?>a+)$/;                # アトミックグループ

# Good: 信頼されていないパターンにタイムアウトを適用
use POSIX qw(alarm);
sub safe_match($string, $pattern, $timeout = 2) {
    my $matched;
    eval {
        local $SIG{ALRM} = sub { die "Regex timeout\n" };
        alarm($timeout);
        $matched = $string =~ $pattern;
        alarm(0);
    };
    alarm(0);
    die $@ if $@;
    return $matched;
}
```

## 安全なファイル操作

### 3引数open

```perl
use v5.36;

# Good: 3引数open、レキシカルファイルハンドル、戻り値チェック
sub read_file($path) {
    open my $fh, '<:encoding(UTF-8)', $path
        or die "Cannot open '$path': $!\n";
    local $/;
    my $content = <$fh>;
    close $fh;
    return $content;
}

# Bad: ユーザーデータを使った2引数open(コマンドインジェクション)
sub bad_read($path) {
    open my $fh, $path;        # $pathが"|rm -rf /"なら、コマンドを実行!
    open my $fh, "< $path";   # シェルメタキャラクターインジェクション
}
```

### TOCTOU防止とパストラバーサル

```perl
use v5.36;
use Fcntl qw(:DEFAULT :flock);
use File::Spec;
use Cwd qw(realpath);

# アトミックファイル作成
sub create_file_safe($path) {
    sysopen(my $fh, $path, O_WRONLY | O_CREAT | O_EXCL, 0600)
        or die "Cannot create '$path': $!\n";
    return $fh;
}

# パスが許可されたディレクトリ内に留まることをバリデート
sub safe_path($base_dir, $user_path) {
    my $real = realpath(File::Spec->catfile($base_dir, $user_path))
        // die "Path does not exist\n";
    my $base_real = realpath($base_dir)
        // die "Base dir does not exist\n";
    die "Path traversal blocked\n" unless $real =~ /^\Q$base_real\E(?:\/|\z)/;
    return $real;
}
```

一時ファイルには`File::Temp`(`tempfile(UNLINK => 1)`)を使用し、レースコンディションを防ぐために`flock(LOCK_EX)`を使用する。

## 安全なプロセス実行

### リスト形式のsystemとexec

```perl
use v5.36;

# Good: リスト形式 — シェル補間なし
sub run_command(@cmd) {
    system(@cmd) == 0
        or die "Command failed: @cmd\n";
}

run_command('grep', '-r', $user_pattern, '/var/log/app/');

# Good: IPC::Run3で安全に出力をキャプチャ
use IPC::Run3;
sub capture_output(@cmd) {
    my ($stdout, $stderr);
    run3(\@cmd, \undef, \$stdout, \$stderr);
    if ($?) {
        die "Command failed (exit $?): $stderr\n";
    }
    return $stdout;
}

# Bad: 文字列形式 — シェルインジェクション!
sub bad_search($pattern) {
    system("grep -r '$pattern' /var/log/app/");  # $patternが"'; rm -rf / #"なら
}

# Bad: 補間のあるバッククォート
my $output = `ls $user_dir`;   # シェルインジェクションリスク
```

外部コマンドからstdout/stderrを安全にキャプチャするためには`Capture::Tiny`も使用する。

## SQLインジェクション防止

### DBIプレースホルダー

```perl
use v5.36;
use DBI;

my $dbh = DBI->connect($dsn, $user, $pass, {
    RaiseError => 1,
    PrintError => 0,
    AutoCommit => 1,
});

# Good: パラメータ化クエリ — 常にプレースホルダーを使用
sub find_user($dbh, $email) {
    my $sth = $dbh->prepare('SELECT * FROM users WHERE email = ?');
    $sth->execute($email);
    return $sth->fetchrow_hashref;
}

sub search_users($dbh, $name, $status) {
    my $sth = $dbh->prepare(
        'SELECT * FROM users WHERE name LIKE ? AND status = ? ORDER BY name'
    );
    $sth->execute

Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.

Install

Pinned to the audited commit 649b2d7

Download folder ↗
git clone https://github.com/affaan-m/ECC
git -C ECC checkout 649b2d7452eb

The author documents no install command, so this uses the repository directly. Our verdict covers commit 649b2d7452eb only.

Works in

The author has not said which agents this skill supports, and we have not tested it in any.

Audit history

Every audit, every source change

  1. ✓SAFE B 89 / 100

    first audit · source 649b2d7452eb

README badge

For maintainers · shows the latest audit

ModelsAtlas: SAFE BMODELSATLASSAFE · B
[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/affaan-m/perl-security/badge.svg)](https://modelsatlas.com/skills/affaan-m/perl-security/)

The badge shows our verdict and grade for this skill, and links back to this page. It changes when the audit does.

eval-harness✓SAFE

affaan-m/everything-claude-code

Eval-driven development (EDD) framework for AI coding sessions — define capability and regression evals before coding, grade with code-based, model-based, rule, or human graders, and track pass@k and pass^k reliability.…

★ 303kGrade B
ecc-recipes✓SAFE

affaan-m/everything-claude-code

Map a described workflow to the right ECC command group with run-order and stop condition, or browse all command-group recipe families read live from the commands directory. Advisory only — never executes. Use when…

★ 302kGrade B
dynamic-workflow-mode✓SAFE

affaan-m/everything-claude-code

Design task-local harnesses, eval gates, and reusable skill extraction for Claude dynamic workflow mode and other adaptive agent harnesses. Use when building a task-local harness, adding eval gates, or extracting a…

★ 302kGrade B
django-verification!CAUTION

affaan-m/everything-claude-code

Run the full Django verification loop — environment check, mypy/ruff/black linting, migration safety, pytest with coverage targets, pip-audit and bandit security scans, settings and logging review, and diff review —…

★ 294kGrade B
django-patterns✓SAFE

affaan-m/everything-claude-code

Django architecture patterns, REST API design with DRF, ORM best practices, caching, signals, middleware, and production-grade Django apps. Use when building or reviewing Django apps, DRF APIs, ORM queries, or caching.

★ 294kGrade B
django-security✓SAFE

affaan-m/everything-claude-code

Django security best practices, authentication, authorization, CSRF protection, SQL injection prevention, XSS prevention, and secure deployment configurations. Use when reviewing Django authentication, authorization,…

★ 294kGrade B

Add this badge to your README

[![ModelsAtlas: SAFE B](https://modelsatlas.com/skills/affaan-m/perl-security/badge.svg)](https://modelsatlas.com/skills/affaan-m/perl-security/)

Questions about Perl Security

What does the Perl Security skill do?
The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Is Perl Security safe to install?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean skill reads B.
What can Perl Security access on my machine?
The audit observed no filesystem, network or shell use at all in its source.
How current is this page?
The grade is for one exact copy of the source (649b2d7452eb), read on 2026-09-21. The repository is watched, and a new audit runs when it changes — this is the first audit.

Sources

Spotted something wrong? Report a correction · Methodology

Keep going in your AI

Opens with this page as the source. We add nothing else to the prompt.