pySCG section 09 Cryptography: providing building blocks in context with sign, encrypt, key-handling
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
Read the existing section 08 rule pyscg-0056 and the linked 07 Concurrency introduction for the guide’s structure. The issue proposes a new 09 Cryptography introduction and individual rules, including moving pyscg-0053 and adding several cryptography topics, but does not identify files or define the final scope. Done means the section provides shared concepts and building-block guidance for sign, encrypt, key handling, and the related rules.
索引モデルが issue の本文から書いたものです。
説明
The write up of new rule pyscg-0056: Verify Downloaded Code Before Running It currently in section 08_coding_standard showed us that
- new designers don't understand some of the key concepts such as 'payload' and 'digest'.
- complexity of using signed software as per 0056 is actually to impractical without additional python modules.
So we need to explain cryptographic basic concepts in 09_Cryptography and also unload complexity from 0056 and move 0053 under section 09.
Historically we have seen similar need for crypto blocks during pyscg-0023: Secure Deserialization we decided that we don't want partial explanations for an overall solution to sign, encrypt, key-handling in individual rules. Instead we want to create of find a introduction to how security can work in Python explaining 'building block' on the road to overall security solutions in the new 09 Cryptography section consisting of:
- A introduction page explaining common concepts across all rules in the section similar to what we do in 07 Concurrency
- Details and examples on 'building blocks' in individual rules
Related issues:
- pySCG: New Python specific rule that promotes signed software, CWE-494: Download of Code Without Integrity Check that requires potential solid building blocks for but like to have a CWE-494 very early on in the guide to bring new designers early onto the path of using only signed software without actually having a full understanding of
On how to create a learning resource consider:
cryptography.iosource: If It Ain't Broken, Do Fix It 21:44 min in- https://opensource.net/security-cryptography-algorithms-python/
Suggested Building blocks for rules in 09 Cryptography:
| Building block / rule | Stdlib? + Refs |
|---|---|
| 09 Cryptography - Introduction Introduces the security goals and mental model for the section: confidentiality, integrity, authenticity, trust anchoring, safe composition, and why the rules build from primitives toward signed software and provenance. |
No - If It Ain't Broken, Do Fix It - Security and Cryptography Algorithms in Python |
| pyscg-0038: Use Sufficiently Random Values Cryptographically secure randomness for tokens, nonces, and secret material |
Yes - PEP 506 - secrets |
| TODO — pyscg-0057: Use Cryptographic Hashes for Integrity Checks Digest computation, file integrity checks, and pinned-digest verification as a minimal integrity mechanism |
Yes - hashlib |
| TODO — pyscg-0058: Compare Security-Critical Values in Constant Time Constant-time comparison during verification; this is comparison hygiene, not HMAC itself |
Yes - hmac |
| TODO — pyscg-0059: Use Keyed Message Authentication for Shared-Secret Integrity MAC/HMAC, shared-secret authenticity and integrity, and why this does not solve publisher provenance or public software distribution |
Yes - hmac- hashlib |
| TODO — pyscg-0060: Derive Keys Securely from Passwords PBKDF2 / scrypt, salts, work factors, and deriving keys from passwords instead of using raw passwords directly |
Yes - hashlib |
| TODO — pyscg-0061: Use TLS with Certificate Validation on Network Interfaces Normal TLS client/server use on application interfaces: CA trust, hostname validation, presenting certificates on service interfaces, and basic mutual TLS concepts |
Yes - ssl |
| TODO — pyscg-0062: Use Authenticated Encryption Instead of Ad-Hoc Encryption Plus Integrity AEAD and why confidentiality and integrity should be combined in a single construction instead of assembled ad hoc |
No - cryptography AEAD |
| TODO — pyscg-0063: Use Digital Signatures for Publisher-Verifiable Authenticity Signatures vs HMAC, public/private key model, and authenticity for software distributed to many consumers |
No - cryptography asymmetric algorithms |
| TODO — pyscg-0064: Validate X.509 Certificates and Chains Outside TLS Handshakes Standalone certificate parsing, certificate-chain inspection, path validation, trust anchors, and policy checks outside a live TLS handshake |
No - cryptography X.509 tutorial - cryptography X.509 verification |
| TODO — pyscg-0065: Verify Package Provenance and Publisher Identity with Index-Hosted Attestations PEP 740, PyPI attestations, publisher identity, provenance objects, and package-index-level verification of signed software |
No - PEP 740 - PyPI attestations docs - pypi-attestations |
| TODO — pyscg-0066: Verify Attestation Signatures and Transparency Evidence DSSE envelopes, signing certificates, transparency log entries, trust roots, and verification policy underlying attestation systems |
No - PEP 740 - PyPI attestations docs - Sigstore |
- 主要言語
- Python
- スター
- 2
- フォーク
- 2
- 平均マージ
- 11分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ossf/python-secure-coding-guide のほかの issue
-
pyscg-0051 should use a context manager対応中かも @s19110 が 8 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
ossf/python-secure-coding-guide#1 · コメント 4 件 · 担当者 1 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
ossf/python-secure-coding-guide#29 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
ossf/python-secure-coding-guide の issue をすべて見る
似ている issue
-
documentation type/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
add entry to blockオープン
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
StevenBlack/hosts#3299 ·
-
`garak --report` overwrites the input report when its name has no ".report"対応中かも @0z5a が今日担当しました。 オープンneeds-triage
難易度 2/5 半日 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信
-
trace: Pi's 1-hour cache writes are priced at 1.25x, but billed at 2x対応中かも @Shizoqua が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
microsoft/TokenEconomizer#221 ·
メンテナーはふだん 1 日以内に返信
-
plot_graph crashes when a mesh node has no m2m edge対応中かも @tygvi が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
mllam/neural-lam#883 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信