@@ -0,0 +1,31 @@
|
|||||||
|
name: Docs security
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
pull_request:
|
||||||
|
schedule:
|
||||||
|
- cron: '17 5 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
security:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: https://github.com/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Record checked revision
|
||||||
|
run: git rev-parse HEAD
|
||||||
|
- name: Scan history with Gitleaks 8.30.1
|
||||||
|
run: |
|
||||||
|
curl --fail --location --silent --show-error https://github.com/gitleaks/gitleaks/releases/download/v8.30.1/gitleaks_8.30.1_linux_x64.tar.gz -o /tmp/gitleaks.tar.gz
|
||||||
|
echo '551f6fc83ea457d62a0d98237cbad105af8d557003051f41f3e7ca7b3f2470eb /tmp/gitleaks.tar.gz' | sha256sum --check
|
||||||
|
mkdir -p /tmp/gitleaks-bin
|
||||||
|
tar -xzf /tmp/gitleaks.tar.gz -C /tmp/gitleaks-bin gitleaks
|
||||||
|
/tmp/gitleaks-bin/gitleaks git --log-opts=--all --redact=100 --no-banner
|
||||||
|
- uses: https://github.com/actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: .nvmrc
|
||||||
|
- name: Audit runtime and development dependencies
|
||||||
|
run: npm audit --include=dev --audit-level=low
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
name: Docs verify
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- '**'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
verify:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: workspace/docs
|
||||||
|
steps:
|
||||||
|
- name: Checkout workspace root
|
||||||
|
uses: https://github.com/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
repository: WealthLedger/main
|
||||||
|
ref: main
|
||||||
|
path: workspace
|
||||||
|
- uses: https://github.com/actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: workspace/docs
|
||||||
|
- name: Checkout linked repositories
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 --branch main https://git.personal.ksv741.ru/WealthLedger/frontend.git ../frontend
|
||||||
|
git clone --depth 1 --branch main https://git.personal.ksv741.ru/WealthLedger/backend.git ../backend
|
||||||
|
git clone --depth 1 --branch main https://git.personal.ksv741.ru/WealthLedger/specs.git ../specs
|
||||||
|
- name: Record checked revisions
|
||||||
|
run: |
|
||||||
|
git rev-parse HEAD
|
||||||
|
git -C .. rev-parse HEAD
|
||||||
|
git -C ../frontend rev-parse HEAD
|
||||||
|
git -C ../backend rev-parse HEAD
|
||||||
|
git -C ../specs rev-parse HEAD
|
||||||
|
- uses: https://github.com/actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version-file: workspace/docs/.nvmrc
|
||||||
|
- run: npm ci
|
||||||
|
- name: Check Markdown and relative links
|
||||||
|
run: npm run verify
|
||||||
@@ -163,3 +163,22 @@ npm run verify
|
|||||||
разработчик от вопроса к объяснению и требованию; агент от типа задачи к нужным
|
разработчик от вопроса к объяснению и требованию; агент от типа задачи к нужным
|
||||||
ограничениям, ADR и репозиторию. Отчёт различает синтаксис, ссылки, рендер,
|
ограничениям, ADR и репозиторию. Отчёт различает синтаксис, ссылки, рендер,
|
||||||
смысловую сверку и оставшиеся ограничения.
|
смысловую сверку и оставшиеся ограничения.
|
||||||
|
|
||||||
|
### CI и обновления зависимостей
|
||||||
|
|
||||||
|
`.gitea/workflows/verify.yml` запускает этот gate на каждом push ветки с Node
|
||||||
|
из `.nvmrc` и установкой через `npm ci`. Checkout docs размещается внутри
|
||||||
|
workspace из `WealthLedger/main`, рядом с frontend, backend и specs. Соседние
|
||||||
|
репозитории берутся из `main`; SHA всех пяти участников сохраняются в логе.
|
||||||
|
Ошибка checkout, Markdown или относительной ссылки завершает job с FAIL.
|
||||||
|
Это проверка ссылок на выбранные revisions, без Mermaid-render и semantic review.
|
||||||
|
|
||||||
|
`security.yml` при push, PR и ежедневно проверяет всю Git-историю через
|
||||||
|
Gitleaks 8.30.1 с redacted-выводом и все npm dependencies через
|
||||||
|
`npm audit --include=dev --audit-level=low`. Override `smol-toml` исправляет
|
||||||
|
DoS в TOML parser markdownlint-cli2; его можно удалить, когда родительский
|
||||||
|
пакет примет исправленную версию.
|
||||||
|
|
||||||
|
Renovate объединяет minor/patch updates; major требует согласования в
|
||||||
|
Dependency Dashboard, automerge не включён. Required checks включаются
|
||||||
|
отдельно в Gitea; workflow сам по себе не запрещает merge.
|
||||||
|
|||||||
Generated
+3
-3
@@ -1319,9 +1319,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/smol-toml": {
|
"node_modules/smol-toml": {
|
||||||
"version": "1.7.0",
|
"version": "1.8.0",
|
||||||
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.8.0.tgz",
|
||||||
"integrity": "sha512-aqVvWoyO21L23mb+drl4RmMXbf6N7FdHjAhTRA9ZBL7apWBgfWC16KjrASI+1p9GAroljyMHj6fK67i0UiTNvQ==",
|
"integrity": "sha512-kCZr2V3ch9i00x8zXRhjUNVcjG9ijES5dDudkXvUVCT5QlJNQWElSJdZqyPemffHoLNUYwOcou0Fy+ojN0uHSQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|||||||
@@ -12,5 +12,10 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"markdownlint-cli2": "0.23.2",
|
"markdownlint-cli2": "0.23.2",
|
||||||
"markdownlint-rule-relative-links": "5.1.2"
|
"markdownlint-rule-relative-links": "5.1.2"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"markdownlint-cli2@0.23.2": {
|
||||||
|
"smol-toml": "1.8.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+26
-1
@@ -1,3 +1,28 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:recommended",
|
||||||
|
":semanticCommitTypeAll(chore)"
|
||||||
|
],
|
||||||
|
"timezone": "Europe/Moscow",
|
||||||
|
"labels": [
|
||||||
|
"dependencies"
|
||||||
|
],
|
||||||
|
"dependencyDashboard": true,
|
||||||
|
"rangeStrategy": "bump",
|
||||||
|
"packageRules": [
|
||||||
|
{
|
||||||
|
"matchUpdateTypes": [
|
||||||
|
"minor",
|
||||||
|
"patch"
|
||||||
|
],
|
||||||
|
"groupName": "non-major dependencies"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"matchUpdateTypes": [
|
||||||
|
"major"
|
||||||
|
],
|
||||||
|
"dependencyDashboardApproval": true
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user