Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ jobs:
# the moment a dependency advisory drops, even before the team
# re-bumps versions:
#
# - pip-audit (transitive CVEs against the OSV / GHSA databases)
# - pip-audit (transitive CVEs against PyPI's vulnerability data, its default service)
# - bandit (static-analysis on forgelm/ production code only)
#
# Severity policy (per tools/check_pip_audit.py + tools/check_bandit.py):
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,16 @@ All notable changes to ForgeLM are documented here.

### Fixed

- Say where the per-release SBOMs actually are and what they contain. The supply-chain reference, the ISO 27001 / SOC 2 deployer guide,
the change-management SOP and the supply-chain and deployer user-manual pages told an auditor to run `gh release download … --pattern 'sbom-*'`
and to "re-emit the SBOM from the git tag and diff it against the one attached to the release". Nothing attaches an SBOM to a
GitHub Release: `publish.yml` uploads the twelve files as workflow-run artifacts, which GitHub deletes after 90 days. The docs now give
the working commands (`gh run list --workflow publish.yml --branch v<X.Y.Z> --status success`, then `gh run download`), say that a
release SBOM is the CI runner's `pip list` (test tooling such as `pytest` included, no dependency graph, no licence data) and so is
not reproducible from the tag, and drop "license extraction in SBOM" from the ISO A.5.32, SOC 2 CC9.2 and statement-of-applicability
rows. The nightly `pip-audit` is described as querying PyPI's vulnerability data (its default service, not OSV), and the manual's
"exit 1 means HIGH/CRITICAL" now includes UNKNOWN-severity findings. English and Turkish. Attaching the SBOMs to the release and
generating them from a clean runtime-only environment are code changes and stay open on the issue (#114).
- Fix the KTO bullet on the Alignment overview user-manual page (English and Turkish): it named the
fields `(prompt, response, good?)`, but the KTO loader reads `prompt`, `completion` and a boolean
`label` (#965).
Expand Down
26 changes: 17 additions & 9 deletions docs/guides/iso_soc2_deployer_guide-tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ ForgeLM kanıtına sahip:
(collection_method, annotation_process, known_biases,
personal_data_included, dpia_completed).
4. **Supply chain** — yayın etiketi başına yayın matrisinin her (OS
× Python-version) hücresi için emit edilen CycloneDX 1.5 SBOM.
Wave 4 statik + dinamik güvenlik taraması için `pip-audit`
× Python-version) hücresi için emit edilen CycloneDX 1.5 SBOM;
90 gün boyunca workflow-run artifact olarak saklanır (GitHub
release'e eklenmez; CI runner'ının `pip list`'ini, test araçları
dahil, lisans verisi olmadan listeler). Wave 4 statik + dinamik güvenlik taraması için `pip-audit`
nightly + `bandit` CI ekler.

## Denetim gözlem dönemi öncesi setup checklist'i
Expand Down Expand Up @@ -198,19 +200,25 @@ eğittiğinin kanıtı saymayın.
### S4: "Supply chain göster"

```bash
# SBOM artefaktını GitHub release sayfasından indir.
gh release download v0.5.5 --pattern 'sbom-*'

# Veya istek üzerine yeniden üret.
# Tag'in publish çalıştırmasından bir SBOM indir. Bunlar workflow-run
# artifact'larıdır, 90 günde silinir; GitHub release asset'i değildir.
gh run list --repo HodeTech/ForgeLM --workflow publish.yml --branch v0.11.0 --status success \
--json databaseId,createdAt
gh run download <databaseId> --repo HodeTech/ForgeLM --name sbom-ubuntu-latest-py3.11

# Veya kendi ortamınızı tanımlayın: modeli eğiten ya da sunan ortamda,
# bir ForgeLM checkout'undan çalıştırın.
python3 tools/generate_sbom.py > sbom.json

# Son yayınla diff al.
diff <(jq -S . sbom-prev.json) <(jq -S . sbom.json)
```

CycloneDX 1.5 JSON her transitive bağımlılığı purl
(`pkg:pypi/...`) ve sürümle listeler. Dependency-Track CVE
korelasyonu için bunu doğal olarak içe alır.
CycloneDX 1.5 JSON kurulu her paketi purl (`pkg:pypi/...`) ve
sürümle listeler; bağımlılık grafiği ve lisans verisi yoktur.
Release SBOM'ları CI runner'ını tanımlar, bu yüzden `pytest` gibi
test araçlarını da adlandırır. Dependency-Track dosyayı CVE
korelasyonu için doğal olarak içe alır.

### S5: "Erişim kontrolleri göster — yalnız yetkili reviewer'ların model onayladığını nasıl ispatlıyorsunuz?"

Expand Down
25 changes: 17 additions & 8 deletions docs/guides/iso_soc2_deployer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ direct ForgeLM evidence:
(collection_method, annotation_process, known_biases,
personal_data_included, dpia_completed).
4. **Supply chain** — CycloneDX 1.5 SBOM emitted per release tag for
every (OS × Python-version) cell of the publish matrix. Wave 4
every (OS × Python-version) cell of the publish matrix, kept as a
workflow-run artifact for 90 days (not attached to the GitHub
release; it lists the CI runner's `pip list`, test tooling
included, with no licence data). Wave 4
adds `pip-audit` nightly + `bandit` CI for static + dynamic
security scanning.

Expand Down Expand Up @@ -198,19 +201,25 @@ corpus trained the model.
### Q4: "Show me the supply chain"

```bash
# Download the SBOM artefact from the GitHub release page.
gh release download v0.5.5 --pattern 'sbom-*'

# Or regenerate on demand.
# Download one SBOM from the tag's publish run. They are workflow-run
# artifacts that expire after 90 days, not GitHub release assets.
gh run list --repo HodeTech/ForgeLM --workflow publish.yml --branch v0.11.0 --status success \
--json databaseId,createdAt
gh run download <databaseId> --repo HodeTech/ForgeLM --name sbom-ubuntu-latest-py3.11

# Or describe your own environment: run this from a ForgeLM checkout in the
# environment that trains or serves the model.
python3 tools/generate_sbom.py > sbom.json

# Diff against last release.
diff <(jq -S . sbom-prev.json) <(jq -S . sbom.json)
```

The CycloneDX 1.5 JSON lists every transitive dependency with its
purl (`pkg:pypi/...`) and version. Dependency-Track ingests this
natively for CVE correlation.
The CycloneDX 1.5 JSON lists every installed package with its purl
(`pkg:pypi/...`) and version; it has no dependency graph and no licence
data. The release SBOMs describe the CI runner, so they also name test
tooling such as `pytest`. Dependency-Track ingests the file natively for
CVE correlation.

### Q5: "Show me the access controls — how do you prove only authorised reviewers approve models?"

Expand Down
9 changes: 6 additions & 3 deletions docs/qms/sop_change_management-tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,12 @@ olarak atfeder.
1.5 SBOM üretir. Wave 4 bir determinism contract testi ekler
(`tests/test_supply_chain_security.py::TestGenerateSbomDeterministic`).

Drift tespiti: bir release'in SBOM'u `git tag`'inden tekrarlanabilir.
Bir denetçi bunu istek üzerine yeniden emit edip GitHub release'e
ekli artefakta diff alabilir.
Drift tespiti: SBOM, release'in build edildiği ortamın kaydıdır (matris runner'ında
`pip list`); tag'in `publish.yml` çalıştırmasının workflow-run artifact'ı olarak 90 gün
saklanır, GitHub release'e eklenmez. Bağımlılıklar build anında PyPI'dan çözüldüğü için
yalnızca `git tag`'den tekrarlanamaz. İki release'in SBOM'unu `diff` ile karşılaştırın;
dağıtılmış bir ortamı kanıtlamak için orada `python3 tools/generate_sbom.py` ile yeni
bir tane üretin.

## 5. Versiyon İzleme

Expand Down
9 changes: 6 additions & 3 deletions docs/qms/sop_change_management.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,12 @@ CycloneDX 1.5 SBOM per (OS × Python-version) on every release tag
(`publish.yml`). Wave 4 adds a determinism contract test
(`tests/test_supply_chain_security.py::TestGenerateSbomDeterministic`).

Drift detection: a release's SBOM is reproducible from its `git tag`.
An auditor can re-emit it on demand and diff against the artefact
attached to the GitHub release.
Drift detection: the SBOM is a record of the environment the release was built in
(`pip list` on the matrix runner), kept as a workflow-run artifact of the tag's
`publish.yml` run for 90 days; it is not attached to the GitHub release. It is not
reproducible from the `git tag` alone, because dependencies resolve from PyPI at build
time. Compare two releases' SBOMs with `diff`; to evidence a deployed environment, emit
a fresh one there with `python3 tools/generate_sbom.py`.

## 5. Version Tracking

Expand Down
2 changes: 1 addition & 1 deletion docs/qms/statement_of_applicability-tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ operatör-tarafı eylem.
| A.5.29 Aksaklık sırasında bilgi güvenliği | YES | `auto_revert` baseline-flip; `model.reverted` event | Base-model retention dokümante et |
| A.5.30 İş sürekliliği için ICT hazırlığı | YES | DR planlama | Benimse |
| A.5.31 Yasal, kanuni, düzenleyici ve sözleşmesel gerekliliklerin tanımlanması | YES | EU AI Act + GDPR mapping'ler; Annex IV bundle | Kural değişikliklerini izle |
| A.5.32 Fikri mülkiyet hakları | YES | SBOM'da lisans çıkarımı; HF model-card metadata | Per-model lisans review |
| A.5.32 Fikri mülkiyet hakları | YES | HF model-card metadata (SBOM lisans verisi taşımaz) | Per-model lisans review |
| A.5.33 Kayıtların korunması | YES | Append-only + HMAC + manifest sidecar; off-site replica | Off-site backup |
| A.5.34 Gizlilik ve PII korunması | YES | `forgelm reverse-pii` Md. 15; `forgelm purge` Md. 17; `forgelm audit` PII tespiti + maskeleme | DSAR workflow + DPIA |
| A.5.35 Bilgi güvenliğinin bağımsız incelenmesi | YES | Yıllık external denetim | Benimse |
Expand Down
2 changes: 1 addition & 1 deletion docs/qms/statement_of_applicability.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ contribution → deployer-side action.
| A.5.29 Information security during disruption | YES | `auto_revert` baseline-flip; `model.reverted` event | Document base-model retention |
| A.5.30 ICT readiness for business continuity | YES | DR planning | Adopt |
| A.5.31 Identification of legal, statutory, regulatory and contractual requirements | YES | EU AI Act + GDPR mappings; Annex IV bundle | Track rule changes |
| A.5.32 Intellectual property rights | YES | License extraction in SBOM; HF model-card metadata | Per-model license review |
| A.5.32 Intellectual property rights | YES | HF model-card metadata (the SBOM carries no licence data) | Per-model license review |
| A.5.33 Protection of records | YES | Append-only + HMAC + manifest; off-site replica | Off-site backup |
| A.5.34 Privacy and protection of PII | YES | `forgelm reverse-pii` Article 15; `forgelm purge` Article 17; `forgelm audit` PII detection + masking | DSAR workflow + DPIA |
| A.5.35 Independent review of information security | YES | Annual external audit | Adopt |
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/iso27001_control_mapping-tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
| A.5.29 Aksaklık sırasında bilgi güvenliği | FL-helps | `auto_revert` baseline-flip; `model.reverted` olayı |
| A.5.30 İş sürekliliği için ICT hazırlığı | OOS | — |
| A.5.31 Yasal, kanuni, düzenleyici ve sözleşmesel gerekliliklerin tanımlanması | FL-helps | EU AI Act + GDPR mappings; Annex IV bundle |
| A.5.32 Fikri mülkiyet hakları | FL-helps | SBOM'da lisans çıkarımı; HF model-card metadata |
| A.5.32 Fikri mülkiyet hakları | FL-helps | HF model-card metadata (SBOM lisans verisi taşımaz) |
| A.5.33 Kayıtların korunması | FL | Append-only + HMAC + manifest sidecar |
| A.5.34 Gizlilik ve PII korunması | FL | `forgelm reverse-pii` Madde 15; `forgelm purge` Madde 17 (ayrıca bkz. A.8.3) |
| A.5.35 Bilgi güvenliğinin bağımsız incelenmesi | OOS | — |
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/iso27001_control_mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
| A.5.29 Information security during disruption | FL-helps | `auto_revert` baseline-flip; `model.reverted` event |
| A.5.30 ICT readiness for business continuity | OOS | — |
| A.5.31 Identification of legal, statutory, regulatory and contractual requirements | FL-helps | EU AI Act + GDPR mappings; Annex IV bundle |
| A.5.32 Intellectual property rights | FL-helps | License extraction in SBOM; HF model-card metadata |
| A.5.32 Intellectual property rights | FL-helps | HF model-card metadata (the SBOM carries no licence data) |
| A.5.33 Protection of records | FL | Append-only + HMAC + manifest sidecar |
| A.5.34 Privacy and protection of PII | FL | `forgelm reverse-pii` Article 15; `forgelm purge` Article 17 (see also A.8.3) |
| A.5.35 Independent review of information security | OOS | — |
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/soc2_trust_criteria_mapping-tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ kategoriler engagement-bazında scoplanır.
| CC7.5 | Düzeltici eylemleri tanımlar, geliştirir | `human_approval.rejected`; `sop_change_management.md` |
| CC8.1 | Değişimleri yetkilendirir | `forgelm approve` Madde 14 gate; staging dir |
| CC9.1 | Riskleri tanımlar, yönetir | `risk_assessment` config + safety eval; `risk_treatment_plan.md` |
| CC9.2 | Tedarikçi + iş ortağı riskini yönetir | SBOM; `loaded` / `unverified` / `local_path` / `unresolved` olarak derecelendirilen dataset Hub commit SHA'sı; temel-model pin'i (`model.revision` → `model_lineage.base_model_revision`); lisans çıkarımı. `model_lineage.component_revisions` altında **sabitlenen ve kaydedilen:** güvenlik sınıflandırıcısı, LLM judge, GRPO ödül modeli, sentetik teacher. **Kapsanmayan:** merge kaynakları ve `forgelm safety-eval` (`--config` almaz) |
| CC9.2 | Tedarikçi + iş ortağı riskini yönetir | SBOM; `loaded` / `unverified` / `local_path` / `unresolved` olarak derecelendirilen dataset Hub commit SHA'sı; temel-model pin'i (`model.revision` → `model_lineage.base_model_revision`). `model_lineage.component_revisions` altında **sabitlenen ve kaydedilen:** güvenlik sınıflandırıcısı, LLM judge, GRPO ödül modeli, sentetik teacher. **Kapsanmayan:** merge kaynakları ve `forgelm safety-eval` (`--config` almaz) |

## Availability (A1.x)

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/soc2_trust_criteria_mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ categories are scoped per-engagement.
| CC7.5 | Identifies, develops corrective actions | `human_approval.rejected`; `sop_change_management.md` |
| CC8.1 | Authorises changes | `forgelm approve` Article 14 gate; staging dir |
| CC9.1 | Identifies, manages risks | `risk_assessment` config + safety eval; `risk_treatment_plan.md` |
| CC9.2 | Manages vendor + business-partner risk | SBOM; dataset Hub commit SHA graded `loaded` / `unverified` / `local_path` / `unresolved`; base-model pin (`model.revision` → `model_lineage.base_model_revision`); license extraction. **Pinned and recorded** under `model_lineage.component_revisions`: safety classifier, LLM judge, GRPO reward model, synthetic teacher. **Not covered:** merge sources, and `forgelm safety-eval` (takes no `--config`) |
| CC9.2 | Manages vendor + business-partner risk | SBOM; dataset Hub commit SHA graded `loaded` / `unverified` / `local_path` / `unresolved`; base-model pin (`model.revision` → `model_lineage.base_model_revision`). **Pinned and recorded** under `model_lineage.component_revisions`: safety classifier, LLM judge, GRPO reward model, synthetic teacher. **Not covered:** merge sources, and `forgelm safety-eval` (takes no `--config`) |

## Availability (A1.x)

Expand Down
32 changes: 23 additions & 9 deletions docs/reference/supply_chain_security-tr.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,17 @@ içinde çalışır:
```

Cross-OS test matrisinin her (OS × Python-version) hücresi için bir
SBOM. Artefaktlar GitHub release sayfasından indirilebilir.
SBOM.

SBOM'lar, release tag'i için çalışan `publish.yml` çalıştırmasının **workflow-run artifact**'larıdır.
GitHub Release sayfasına eklenmezler ve GitHub, deponun saklama süresi (90 gün) dolunca run
artifact'larını siler; ihtiyacınız olanı çalıştırma hâlâ duruyorken indirin ve kayıtlarınızla
birlikte arşivleyin.

Bir SBOM'un listelediği: matris runner'ında paketlenmiş wheel kurulduktan sonraki `pip list`
çıktısı (bağımlılıkları o anda PyPI'dan çözülür, sabitlenmemiştir), Linux'ta `qlora`, `ingestion`
ve `eval` extras'ı ve `pytest` / `pytest-cov`. Bu yüzden runtime kapanışının yanında test araçlarını
da adlandırır, bağımlılık grafiği taşımaz ve **lisans verisi taşımaz**.

### Determinism contract

Expand All @@ -52,17 +62,21 @@ Wave 4 / Faz 23 bir determinism testi ekler
- `tests/test_supply_chain_security.py::TestGenerateSbomDeterministic::test_two_invocations_produce_same_content`
CI'da bunu pin'ler.

Bir denetçi karşılık gelen `git tag`'den SBOM'u yeniden emit edip
GitHub release'e ekli artefaktla diff alabilir; trivial olmayan
herhangi bir fark build ortamında dependency-resolution drift'ine
işaret eder.
Determinizm, aynı ortama özgü bir özelliktir. Aynı `git tag`'den sonradan yapılan yeniden
emit'in bir release'in SBOM'uyla eşleşmesi beklenmez; çünkü o release bağımlılıklarını
build edildiği anda PyPI'dan çözdü. **Sizin** dağıttığınızı kaydetmek için, modeli eğiten ya da
sunan ortamda bir ForgeLM checkout'undan `python3 tools/generate_sbom.py` çalıştırın.

### SBOM'u tüketme

```bash
# Bir release için tüm SBOM'ları indir. v<X.Y.Z>'yi CI'da pinlediğiniz
# tag ile değiştirin; SBOM artefakt formatı release'ler arasında stabildir.
gh release download v<X.Y.Z> --pattern 'sbom-*'
# CI'da pinlediğiniz tag için başarılı publish çalıştırmasını bulun (bir tag'in
# daha önce başarısız olmuş bir çalıştırması olabilir), sonra ondan bir SBOM indirin.
# v<X.Y.Z>'yi tag ile değiştirin. Run artifact'ları 90 günde silinir; on ikisi için
# --pattern 'sbom-*' kullanın.
gh run list --repo HodeTech/ForgeLM --workflow publish.yml --branch v<X.Y.Z> --status success \
--json databaseId,createdAt
gh run download <databaseId> --repo HodeTech/ForgeLM --name sbom-ubuntu-latest-py3.11

# İnsan inceleme için pretty-print.
jq . sbom-ubuntu-latest-py3.11.json | less
Expand Down Expand Up @@ -110,7 +124,7 @@ Wave 4 / Faz 23 nightly workflow'a `pip-audit` ekler. Davranış:
Belirli bir CVE'yi kabul etmek için opt-in ignore dosyasıyla
dokümante edin (aşağıdaki Suppression'a bakın); yeşil kalmak için
UNKNOWN kovasına güvenmeyin.
- OSV / GHSA veritabanlarını kullanır (pip-audit varsayılanı).
- PyPI'ın güvenlik açığı verisini sorgular (pip-audit'in varsayılan `pypi` servisi; nightly `--vulnerability-service` geçmez).

Operatörler aynı tooling'i lokalde kurar:

Expand Down
Loading
Loading