aidd-timing-safe-compare

This code review rule discusses timing leaks when comparing secrets and tokens. The author proposes hashing values with SHA3-256 first. Hashing alone does not guarantee a constant-time comparison.

Last repository push
Stars
390
Forks
32
Issues / PRs
34

Installation

Review the source and dependencies with a prompt.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "aidd-timing-safe-compare" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-39d78750c0b50d5dda3be52a36635b4b0b58fc1edda64103aab0983e90fbb3f0. Verify the upstream source and version against https://github.com/paralleldrive/aidd before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

A complete, approved package is not available yet.

Source and setup

github.com

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

This code review rule discusses timing leaks when comparing secrets and tokens. The author proposes hashing values with SHA3-256 first. Hashing alone does not guarantee a constant-time comparison.

0 Downloads 0 Share clicks

Introduction source: third_party · paralleldrive · 0.0.1 Reference

SkillPi interpretation

Tasks
Security rule for timing-safe secret comparison. Use SHA3-256 hashing instead of timing-safe compare functions. Use when reviewing or implementing secret comparisons, token validation, CSRF tokens, or API key checks.
Audience
Not specified in the source documentation.
Inputs and outputs
Not specified in the source documentation.
Software, accounts and paid services
Not specified in the source documentation.
Limits and differences
If a compare returns faster when some prefix values are correct, attackers can play a game of hangman to guess the secret. Using statistics, this can still work over a network with timing jitter. There is no timing safe compare for raw values. Never use: crypto.timingSafeEqual hmac.compare_digest subtle.ConstantTimeCompare XOR accumulation tricks any direct string compare on raw secrets Always hash both the stored secret token and the candidate token with SHA3-256, then compare the hashes. This rule overrides all library defaults. See timing-safe compare vulnerabilities for vulnerability reports in the wild. Reasons: 1. Hashing removes all prefix structure. Any bit change fully randomizes th
Testing
Not tested

Browse files

A verified file list is not available on Skillπ yet.

Browse files at the source ↗

Original SKILL.md

Open original ↗

Skillπ does not display the original SKILL.md on this page. View the original source ↗ The source site governs the file contents, license, and use terms.

Version history

  1. v3.1.0 GitHub ↗
    Original release notes

    ## What's Changed * react tweak by @krisnye in https://github.com/paralleldrive/aidd/pull/175 * fix(create): prefer GitHub CLI token for scaffold GitHub auth by @ericelliott in https://github.com/paralleldrive/aidd/pull/176 **Full Changelog**: https://github.com/paralleldrive/aidd/compare/v3.0.0...v3.1.0

  2. v3.0.0 GitHub ↗
    Original release notes

    ## What's Changed * feat(skills): migrate rules to Agent Skills spec format by @janhesters in https://github.com/paralleldrive/aidd/pull/83 * fix(skills): move context references to parent skill resources by @janhesters in https://github.com/paralleldrive/aidd/pull/155 * Add `import aidd-custom/AGENTS.md` override directive to AGENTS.md by @Copilot in https://github.com/paralleldrive/aidd/pull/161 * fix(scaffold-create): auto-cleanup downloaded scaffold after create (#157) by @ericelliott in https://github.com/paralleldrive/aidd/pull/158 * feat: add AI prompt evaluation tests for the review skill by @janhesters in https://github.com/paralleldrive/aidd/pull/156 * docs: add README.md documentation for all skills by @janhesters in https://github.com/paralleldrive/aidd/pull/151 * feat: aidd create --prompt epic by @ericelliott in https://github.com/paralleldrive/aidd/pull/143 * fix(ci): stabilize main test pipeline ai-eval gating and review guidance by @ericelliott in https://github.com/paralleldrive/aidd/pull/173 * fix(release): exclude e2e tests from pre-release hook by @ericelliott in https://github.com/paralleldrive/aidd/pull/174 **Full Changelog**: https://github.com/paralleldrive/aidd/compare/v2.8.0...v3.0.0

  3. v2.8.0 GitHub ↗
    Original release notes

    ## What's Changed * Aidd create prompt by @ericelliott in https://github.com/paralleldrive/aidd/pull/141 * 2026-03-10 training video by @ericelliott in https://github.com/paralleldrive/aidd/pull/147 * Churn command documentation by @ericelliott in https://github.com/paralleldrive/aidd/pull/148 * fix(aidd create): Scaffold files were not copied to the project folder by @ericelliott in https://github.com/paralleldrive/aidd/pull/146 **Full Changelog**: https://github.com/paralleldrive/aidd/compare/v2.7.0...v2.8.0

  4. v2.7.0 GitHub ↗
    Original release notes

    ## What's Changed * feat: /aidd-churn by @ericelliott in https://github.com/paralleldrive/aidd/pull/133 * feat(scaffold): add `create`, `verify-scaffold`, `scaffold-cleanup`, and `set` commands by @ericelliott in https://github.com/paralleldrive/aidd/pull/124 * fix(test): quote cliPath in create-e2e to handle paths with spaces by @ericelliott in https://github.com/paralleldrive/aidd/pull/138 **Full Changelog**: https://github.com/paralleldrive/aidd/compare/v2.6.0...v2.7.0

  5. v2.6.0 GitHub ↗
    Original release notes

    ## What's Changed * Add new setup guide for Next.js with ShadCN by @ericelliott in https://github.com/paralleldrive/aidd/pull/69 * Enhance TDD documentation with UI testing strategy by @ericelliott in https://github.com/paralleldrive/aidd/pull/79 * Enhance README with AI challenges and AIDD benefits by @ericelliott in https://github.com/paralleldrive/aidd/pull/81 * Improve clarity of AIDD benefits in README by @ericelliott in https://github.com/paralleldrive/aidd/pull/82 * Replace ESLint and Prettier with Biome by @janhesters in https://github.com/paralleldrive/aidd/pull/85 * Update task execution steps and approval process by @ericelliott in https://github.com/paralleldrive/aidd/pull/91 * Plan `npx aidd create` epic for app scaffolding by @ericelliott in https://github.com/paralleldrive/aidd/pull/96 * initial enlistment of core architecture skills by @krisnye in https://github.com/paralleldrive/aidd/pull/102 * Add aidd-fix skill for structured bug fixing workflow by @ericelliott in https://github.com/paralleldrive/aidd/pull/103 * feat(aidd-fix): rewrite SKILL.md with SudoLang pipeline by @ericelliott in https://github.com/paralleldrive/aidd/pull/110 * Fix/e2e path spaces by @ericelliott in https://github.com/paralleldrive/aidd/pull/111 ## New Contributors * @krisnye made their first contribution in https://github.com/paralleldrive/aidd/pull/102 **Full Changelog**: https://github.com/paralleldrive/aidd/compare/v2.5.0...v2.6.0

Only the five most recent versions are shown. View full version history at the source ↗

Current listing version

0.0.1

Verify the source revision ↗

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value78/100

Highlights

  • 提供时序安全比较的安全编码规范,解决实际开发中的安全隐患
  • 适用于多种安全敏感场景(令牌验证、CSRF保护、API密钥校验等)
Trigger Precision92/100

Highlights

  • 触发描述清晰准确,覆盖多种变体场景
  • 明确指出了具体的技术方案和适用边界
Structure and Standards88/100

Areas to improve

  • 缺少When to Use/示例章节 Reported severity: Minor

    文档缺少具体的When to Use说明和使用示例

    Recommendation: 建议补充When to Use章节和具体代码示例以增强实用性

Highlights

  • 文档结构完整,包含约束说明、原因解释和模式指南
  • 提供了清晰的执行步骤和审查规则
Execution Reliability85/100

Highlights

  • 提供了具体的SHA3-256实现策略
  • 覆盖了主要异常情况和风险点
  • 给出了不同场景下的分级处理建议
Evidence Verifiability (mean of the first four)86/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

No text check results available.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

The main document is unavailable or exceeds this check’s scope; permissions are unknown.

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

risk · Static evidence review; not a runtime safety guarantee.

Not specified in the source documentation.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.