keyloom 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- keyloom-0.1.0/.github/workflows/ci.yml +194 -0
- keyloom-0.1.0/.gitignore +17 -0
- keyloom-0.1.0/.gitlab/scripts/security_gate.py +71 -0
- keyloom-0.1.0/.gitlab-ci.yml +208 -0
- keyloom-0.1.0/LICENSES/Apache-2.0.txt +73 -0
- keyloom-0.1.0/LICENSES/OFL-1.1.txt +43 -0
- keyloom-0.1.0/PKG-INFO +31 -0
- keyloom-0.1.0/REUSE.toml +25 -0
- keyloom-0.1.0/docs/api/index.md +18 -0
- keyloom-0.1.0/docs/cpdocs.yml +43 -0
- keyloom-0.1.0/docs/hooks/brand.py +30 -0
- keyloom-0.1.0/docs/hooks/numbered_headings.py +58 -0
- keyloom-0.1.0/docs/web/api.md +26 -0
- keyloom-0.1.0/docs/web/getting-started.md +257 -0
- keyloom-0.1.0/docs/web/how-it-works.md +199 -0
- keyloom-0.1.0/docs/web/index.md +159 -0
- keyloom-0.1.0/docs/web/reference.md +393 -0
- keyloom-0.1.0/docs/web/stylesheets/extra.css +48 -0
- keyloom-0.1.0/examples/credentials.toml +12 -0
- keyloom-0.1.0/examples/credentials.yaml +11 -0
- keyloom-0.1.0/properdocs.yml +78 -0
- keyloom-0.1.0/pyproject.toml +82 -0
- keyloom-0.1.0/readme.md +16 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/icon/pdf/keyloom-icon-color-on-transparent-none.pdf +0 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/icon/png/keyloom-icon-color-on-transparent-none-2048px.png +0 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/icon/svg/keyloom-icon-color-on-transparent-none.svg +44 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/logo-horizontal/pdf/keyloom-logo-horizontal-color-on-transparent-none.pdf +0 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/logo-horizontal/png/keyloom-logo-horizontal-color-on-transparent-none-2048px.png +0 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/logo-horizontal/svg/keyloom-logo-horizontal-color-on-transparent-none.svg +45 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/manifest.json +174 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/wordmark/pdf/keyloom-wordmark-color-on-transparent-none.pdf +0 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/wordmark/png/keyloom-wordmark-color-on-transparent-none-2048px.png +0 -0
- keyloom-0.1.0/share/keyloom/brandkit/generated/wordmark/svg/keyloom-wordmark-color-on-transparent-none.svg +8 -0
- keyloom-0.1.0/share/keyloom/source/ADLaMDisplay-Regular.ttf +0 -0
- keyloom-0.1.0/share/keyloom/source/icon.svg +45 -0
- keyloom-0.1.0/share/keyloom/source/logo.svg +239 -0
- keyloom-0.1.0/share/keyloom/source/wordmark.svg +64 -0
- keyloom-0.1.0/src/keyloom/__init__.py +357 -0
- keyloom-0.1.0/src/keyloom/_cli.py +481 -0
- keyloom-0.1.0/src/keyloom/_envelope.py +338 -0
- keyloom-0.1.0/src/keyloom/_errors.py +36 -0
- keyloom-0.1.0/src/keyloom/_files.py +389 -0
- keyloom-0.1.0/src/keyloom/_formats.py +235 -0
- keyloom-0.1.0/src/keyloom/_metadata.py +30 -0
- keyloom-0.1.0/src/keyloom/_tree.py +236 -0
- keyloom-0.1.0/tests/conftest.py +30 -0
- keyloom-0.1.0/tests/test_api.py +311 -0
- keyloom-0.1.0/tests/test_cli.py +638 -0
- keyloom-0.1.0/tests/test_crypto.py +328 -0
- keyloom-0.1.0/tests/test_files.py +652 -0
- keyloom-0.1.0/tests/test_fuzz.py +109 -0
- keyloom-0.1.0/tests/test_model.py +373 -0
- keyloom-0.1.0/tests/test_security_gate.py +111 -0
- keyloom-0.1.0/uv.lock +1855 -0
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------------
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 SEANERGYS Partners <https://seanergys.eu>
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
name: ci
|
|
7
|
+
|
|
8
|
+
on:
|
|
9
|
+
push:
|
|
10
|
+
branches: [main]
|
|
11
|
+
pull_request:
|
|
12
|
+
|
|
13
|
+
# Every job reads the repository only; deploy-pages asks for more itself.
|
|
14
|
+
permissions:
|
|
15
|
+
contents: read
|
|
16
|
+
|
|
17
|
+
# A new push to a pull request or branch cancels its running pipeline.
|
|
18
|
+
concurrency:
|
|
19
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
20
|
+
cancel-in-progress: true
|
|
21
|
+
|
|
22
|
+
# Actions are pinned to commits; the comment above each names its release.
|
|
23
|
+
jobs:
|
|
24
|
+
# ----------------------------------------------------------------------------
|
|
25
|
+
# Legal
|
|
26
|
+
# ----------------------------------------------------------------------------
|
|
27
|
+
|
|
28
|
+
reuse:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
steps:
|
|
31
|
+
# v7.0.1
|
|
32
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
33
|
+
with:
|
|
34
|
+
persist-credentials: false
|
|
35
|
+
# v10.3.0
|
|
36
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
|
|
37
|
+
with:
|
|
38
|
+
enable-cache: true
|
|
39
|
+
- run: uv sync --locked
|
|
40
|
+
- run: uv run reuse lint
|
|
41
|
+
|
|
42
|
+
# ----------------------------------------------------------------------------
|
|
43
|
+
# Check
|
|
44
|
+
# ----------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
ruff:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
# v7.0.1
|
|
50
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
51
|
+
with:
|
|
52
|
+
persist-credentials: false
|
|
53
|
+
# v10.3.0
|
|
54
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
|
|
55
|
+
with:
|
|
56
|
+
enable-cache: true
|
|
57
|
+
- run: uv sync --locked
|
|
58
|
+
- run: uv run ruff check
|
|
59
|
+
- run: uv run ruff format --check
|
|
60
|
+
|
|
61
|
+
# ----------------------------------------------------------------------------
|
|
62
|
+
# Test
|
|
63
|
+
# ----------------------------------------------------------------------------
|
|
64
|
+
|
|
65
|
+
unit-test:
|
|
66
|
+
runs-on: ubuntu-latest
|
|
67
|
+
strategy:
|
|
68
|
+
fail-fast: false
|
|
69
|
+
matrix:
|
|
70
|
+
python: ["3.11", "3.12", "3.13", "3.14"]
|
|
71
|
+
steps:
|
|
72
|
+
# v7.0.1
|
|
73
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
74
|
+
with:
|
|
75
|
+
persist-credentials: false
|
|
76
|
+
# v10.3.0
|
|
77
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
|
|
78
|
+
with:
|
|
79
|
+
enable-cache: true
|
|
80
|
+
python-version: ${{ matrix.python }}
|
|
81
|
+
- run: uv sync --locked
|
|
82
|
+
- run: uv run pytest -q --ignore=tests/test_fuzz.py
|
|
83
|
+
|
|
84
|
+
fuzz-test:
|
|
85
|
+
runs-on: ubuntu-latest
|
|
86
|
+
env:
|
|
87
|
+
KEYLOOM_FUZZ_CASES: "100"
|
|
88
|
+
# The run id makes every run explore new cases and is printed below, so
|
|
89
|
+
# a failure can be replayed by setting KEYLOOM_FUZZ_SEED to it.
|
|
90
|
+
KEYLOOM_FUZZ_SEED: ${{ github.run_id }}
|
|
91
|
+
steps:
|
|
92
|
+
# v7.0.1
|
|
93
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
94
|
+
with:
|
|
95
|
+
persist-credentials: false
|
|
96
|
+
# v10.3.0
|
|
97
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
|
|
98
|
+
with:
|
|
99
|
+
enable-cache: true
|
|
100
|
+
- run: uv sync --locked
|
|
101
|
+
- run: echo "fuzz seed=$KEYLOOM_FUZZ_SEED cases=$KEYLOOM_FUZZ_CASES"
|
|
102
|
+
- run: uv run pytest -q tests/test_fuzz.py
|
|
103
|
+
|
|
104
|
+
# ----------------------------------------------------------------------------
|
|
105
|
+
# Security
|
|
106
|
+
# ----------------------------------------------------------------------------
|
|
107
|
+
|
|
108
|
+
# pip-audit checks the locked runtime dependencies against the PyPI advisory
|
|
109
|
+
# database.
|
|
110
|
+
pip-audit:
|
|
111
|
+
runs-on: ubuntu-latest
|
|
112
|
+
steps:
|
|
113
|
+
# v7.0.1
|
|
114
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
115
|
+
with:
|
|
116
|
+
persist-credentials: false
|
|
117
|
+
# v10.3.0
|
|
118
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
|
|
119
|
+
with:
|
|
120
|
+
enable-cache: true
|
|
121
|
+
- run: uv sync --locked
|
|
122
|
+
- run: >-
|
|
123
|
+
uv export --frozen --no-default-groups --no-emit-project
|
|
124
|
+
--format requirements-txt --output-file requirements.txt
|
|
125
|
+
- run: >-
|
|
126
|
+
uv run pip-audit --strict --disable-pip --require-hashes
|
|
127
|
+
-r requirements.txt
|
|
128
|
+
|
|
129
|
+
# ----------------------------------------------------------------------------
|
|
130
|
+
# Build
|
|
131
|
+
# ----------------------------------------------------------------------------
|
|
132
|
+
|
|
133
|
+
build-package:
|
|
134
|
+
runs-on: ubuntu-latest
|
|
135
|
+
steps:
|
|
136
|
+
# v7.0.1
|
|
137
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
138
|
+
with:
|
|
139
|
+
persist-credentials: false
|
|
140
|
+
# v10.3.0
|
|
141
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
|
|
142
|
+
- run: uv build
|
|
143
|
+
# v7.0.2
|
|
144
|
+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
|
|
145
|
+
with:
|
|
146
|
+
name: dist
|
|
147
|
+
path: dist/
|
|
148
|
+
|
|
149
|
+
# cpdocs builds the API of every version in docs/cpdocs.yml from Git, so the
|
|
150
|
+
# job needs the full history and the branches. It documents the version
|
|
151
|
+
# named "main" from this checkout instead of origin/main: a pull request
|
|
152
|
+
# then checks the API documentation of the code under review, and only a
|
|
153
|
+
# push to main publishes it.
|
|
154
|
+
build-docs:
|
|
155
|
+
runs-on: ubuntu-latest
|
|
156
|
+
env:
|
|
157
|
+
CPDOCS_CURRENT_BRANCH: main
|
|
158
|
+
steps:
|
|
159
|
+
# v7.0.1
|
|
160
|
+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
|
|
161
|
+
with:
|
|
162
|
+
fetch-depth: 0
|
|
163
|
+
persist-credentials: false
|
|
164
|
+
# v10.3.0
|
|
165
|
+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
|
|
166
|
+
with:
|
|
167
|
+
enable-cache: true
|
|
168
|
+
- run: uv sync --locked --group docs
|
|
169
|
+
- run: uv run properdocs build --strict
|
|
170
|
+
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
171
|
+
# v5.0.0
|
|
172
|
+
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9
|
|
173
|
+
with:
|
|
174
|
+
path: build/site
|
|
175
|
+
|
|
176
|
+
# ----------------------------------------------------------------------------
|
|
177
|
+
# Deploy
|
|
178
|
+
# ----------------------------------------------------------------------------
|
|
179
|
+
|
|
180
|
+
deploy-pages:
|
|
181
|
+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
182
|
+
needs: build-docs
|
|
183
|
+
runs-on: ubuntu-latest
|
|
184
|
+
permissions:
|
|
185
|
+
# Publish to GitHub Pages, with an OIDC token proving which run deploys.
|
|
186
|
+
pages: write
|
|
187
|
+
id-token: write
|
|
188
|
+
environment:
|
|
189
|
+
name: github-pages
|
|
190
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
191
|
+
steps:
|
|
192
|
+
- id: deployment
|
|
193
|
+
# v5.0.1
|
|
194
|
+
uses: actions/deploy-pages@368f82528645a54fb793d4d04e342629a3f51346
|
keyloom-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------------
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 SEANERGYS Partners <https://seanergys.eu>
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
__pycache__/
|
|
7
|
+
*.py[cod]
|
|
8
|
+
.pytest_cache/
|
|
9
|
+
.ruff_cache/
|
|
10
|
+
.venv/
|
|
11
|
+
.cache/
|
|
12
|
+
build/
|
|
13
|
+
dist/
|
|
14
|
+
*.egg-info/
|
|
15
|
+
|
|
16
|
+
# ProperDocs output for GitLab Pages; the build itself goes to build/site.
|
|
17
|
+
public/
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------------
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 SEANERGYS Partners <https://seanergys.eu>
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
"""Fail the pipeline on findings in GitLab's security reports.
|
|
6
|
+
|
|
7
|
+
Without GitLab Ultimate, scanner findings appear only in the report artifacts
|
|
8
|
+
and never fail a pipeline. This script fails on any detected secret and on
|
|
9
|
+
Critical or High SAST and IaC findings, and lists every finding. Missing or
|
|
10
|
+
malformed reports fail closed: a successful scanner always produces a report.
|
|
11
|
+
The security-gate job requires reports in every pipeline, including tags.
|
|
12
|
+
|
|
13
|
+
Run it in the directory that holds the downloaded reports.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
import json as _json
|
|
17
|
+
import pathlib as _pathlib
|
|
18
|
+
import sys as _sys
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def describe(*, finding: dict) -> str:
|
|
22
|
+
"""Return one line naming the severity, location and title of a finding."""
|
|
23
|
+
severity = finding.get("severity", "Unknown")
|
|
24
|
+
location = finding.get("location", {})
|
|
25
|
+
where = f"{location.get('file')}:{location.get('start_line')}"
|
|
26
|
+
title = finding.get("name") or finding.get("message")
|
|
27
|
+
return f"{severity}: {where}: {title}"
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def check(*, path: _pathlib.Path, blocking: set[str] | None) -> bool:
|
|
31
|
+
"""Print findings; fail on blocking findings or an unreadable report.
|
|
32
|
+
|
|
33
|
+
With blocking None, every finding blocks. Even a clean scanner must
|
|
34
|
+
generate a valid report with a vulnerabilities array.
|
|
35
|
+
"""
|
|
36
|
+
try:
|
|
37
|
+
report = _json.loads(path.read_text(encoding="utf-8"))
|
|
38
|
+
if not isinstance(report, dict):
|
|
39
|
+
raise ValueError("report must be a JSON object")
|
|
40
|
+
findings = report.get("vulnerabilities")
|
|
41
|
+
if not isinstance(findings, list) or any(
|
|
42
|
+
not isinstance(finding, dict) for finding in findings
|
|
43
|
+
):
|
|
44
|
+
raise ValueError("vulnerabilities must be an array of objects")
|
|
45
|
+
except (OSError, UnicodeError, ValueError) as exc:
|
|
46
|
+
print(f"{path.name}: missing or invalid security report: {exc}")
|
|
47
|
+
return True
|
|
48
|
+
print(f"{path.name}: {len(findings)} finding(s)")
|
|
49
|
+
failed = False
|
|
50
|
+
for finding in findings:
|
|
51
|
+
print(f" {describe(finding=finding)}")
|
|
52
|
+
if blocking is None or finding.get("severity") in blocking:
|
|
53
|
+
failed = True
|
|
54
|
+
return failed
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def main() -> int:
|
|
58
|
+
"""Check every required scanner report in the working directory."""
|
|
59
|
+
failed = False
|
|
60
|
+
for name, blocking in (
|
|
61
|
+
("gl-secret-detection-report.json", None),
|
|
62
|
+
("gl-sast-report.json", {"Critical", "High"}),
|
|
63
|
+
("gl-iac-sast-report.json", {"Critical", "High"}),
|
|
64
|
+
):
|
|
65
|
+
# Do not short-circuit: a missing report must not hide other findings.
|
|
66
|
+
failed = check(path=_pathlib.Path(name), blocking=blocking) or failed
|
|
67
|
+
return 1 if failed else 0
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
if __name__ == "__main__":
|
|
71
|
+
_sys.exit(main())
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------------
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 SEANERGYS Partners <https://seanergys.eu>
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
stages:
|
|
7
|
+
- legal
|
|
8
|
+
- check
|
|
9
|
+
- test
|
|
10
|
+
- security
|
|
11
|
+
- build
|
|
12
|
+
- deploy
|
|
13
|
+
|
|
14
|
+
include:
|
|
15
|
+
# Licence and copyright information of every file, checked before any other
|
|
16
|
+
# work. Creates the job primary.reuse.
|
|
17
|
+
- component: $CI_SERVER_FQDN/software/catalog/reuse@main
|
|
18
|
+
inputs:
|
|
19
|
+
stage: legal
|
|
20
|
+
# GitLab's scanners that run in Premium. Dependency scanning, DAST, API and
|
|
21
|
+
# coverage-guided fuzzing need Ultimate, and container scanning needs an
|
|
22
|
+
# image, which this project does not build.
|
|
23
|
+
- template: Jobs/SAST.gitlab-ci.yml
|
|
24
|
+
- template: Jobs/SAST-IaC.gitlab-ci.yml
|
|
25
|
+
- template: Jobs/Secret-Detection.gitlab-ci.yml
|
|
26
|
+
|
|
27
|
+
default:
|
|
28
|
+
image: ghcr.io/astral-sh/uv:python3.11-bookworm-slim
|
|
29
|
+
|
|
30
|
+
variables:
|
|
31
|
+
UV_CACHE_DIR: "$CI_PROJECT_DIR/.cache/uv"
|
|
32
|
+
UV_LINK_MODE: copy
|
|
33
|
+
|
|
34
|
+
.uv:
|
|
35
|
+
before_script:
|
|
36
|
+
- uv sync --locked
|
|
37
|
+
cache:
|
|
38
|
+
key:
|
|
39
|
+
files: [uv.lock]
|
|
40
|
+
paths: [.cache/uv]
|
|
41
|
+
|
|
42
|
+
# ------------------------------------------------------------------------------
|
|
43
|
+
# Check
|
|
44
|
+
# ------------------------------------------------------------------------------
|
|
45
|
+
|
|
46
|
+
ruff:
|
|
47
|
+
extends: .uv
|
|
48
|
+
stage: check
|
|
49
|
+
script:
|
|
50
|
+
- uv run ruff check
|
|
51
|
+
- uv run ruff format --check
|
|
52
|
+
|
|
53
|
+
# ------------------------------------------------------------------------------
|
|
54
|
+
# Test
|
|
55
|
+
# ------------------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
unit-test:
|
|
58
|
+
extends: .uv
|
|
59
|
+
stage: test
|
|
60
|
+
script:
|
|
61
|
+
- uv run pytest -q --ignore=tests/test_fuzz.py
|
|
62
|
+
|
|
63
|
+
fuzz-test:
|
|
64
|
+
extends: .uv
|
|
65
|
+
stage: test
|
|
66
|
+
variables:
|
|
67
|
+
KEYLOOM_FUZZ_CASES: "100"
|
|
68
|
+
script:
|
|
69
|
+
- export KEYLOOM_FUZZ_SEED="${KEYLOOM_FUZZ_SEED:-$CI_PIPELINE_ID}"
|
|
70
|
+
- echo "fuzz seed=$KEYLOOM_FUZZ_SEED cases=$KEYLOOM_FUZZ_CASES"
|
|
71
|
+
- uv run pytest -q tests/test_fuzz.py
|
|
72
|
+
|
|
73
|
+
# ------------------------------------------------------------------------------
|
|
74
|
+
# Security
|
|
75
|
+
# ------------------------------------------------------------------------------
|
|
76
|
+
|
|
77
|
+
# The templates put their jobs in the test stage; move them here. Every
|
|
78
|
+
# analyzer job extends one of these base jobs.
|
|
79
|
+
sast:
|
|
80
|
+
stage: security
|
|
81
|
+
|
|
82
|
+
iac-sast:
|
|
83
|
+
stage: security
|
|
84
|
+
|
|
85
|
+
# A scanner that crashes fails the pipeline instead of passing silently, and
|
|
86
|
+
# its report is kept as a plain artifact for security-gate.
|
|
87
|
+
semgrep-sast:
|
|
88
|
+
allow_failure: false
|
|
89
|
+
rules:
|
|
90
|
+
- when: on_success
|
|
91
|
+
artifacts:
|
|
92
|
+
paths: [gl-sast-report.json]
|
|
93
|
+
|
|
94
|
+
kics-iac-sast:
|
|
95
|
+
allow_failure: false
|
|
96
|
+
rules:
|
|
97
|
+
- when: on_success
|
|
98
|
+
# IaC and code SAST both use gl-sast-report.json. Keep distinct report
|
|
99
|
+
# artifact names to prevent one scanner from overwriting the other when
|
|
100
|
+
# security-gate downloads the jobs' artifacts.
|
|
101
|
+
after_script:
|
|
102
|
+
- if test -f gl-sast-report.json; then mv gl-sast-report.json gl-iac-sast-report.json; fi
|
|
103
|
+
artifacts:
|
|
104
|
+
when: always
|
|
105
|
+
paths: [gl-iac-sast-report.json]
|
|
106
|
+
reports:
|
|
107
|
+
sast: gl-iac-sast-report.json
|
|
108
|
+
|
|
109
|
+
secret_detection:
|
|
110
|
+
stage: security
|
|
111
|
+
allow_failure: false
|
|
112
|
+
rules:
|
|
113
|
+
- when: on_success
|
|
114
|
+
artifacts:
|
|
115
|
+
paths: [gl-secret-detection-report.json]
|
|
116
|
+
|
|
117
|
+
# Without Ultimate, findings appear only in the report artifacts and never
|
|
118
|
+
# fail a pipeline; .gitlab/scripts/security_gate.py turns them into a failing
|
|
119
|
+
# job and lists every finding.
|
|
120
|
+
security-gate:
|
|
121
|
+
stage: security
|
|
122
|
+
needs:
|
|
123
|
+
- job: semgrep-sast
|
|
124
|
+
artifacts: true
|
|
125
|
+
- job: secret_detection
|
|
126
|
+
artifacts: true
|
|
127
|
+
- job: kics-iac-sast
|
|
128
|
+
artifacts: true
|
|
129
|
+
# Every pipeline, including tags, requires all three scanner reports.
|
|
130
|
+
script:
|
|
131
|
+
- python3 .gitlab/scripts/security_gate.py
|
|
132
|
+
|
|
133
|
+
# GitLab's dependency scanning needs Ultimate. pip-audit checks the locked
|
|
134
|
+
# runtime dependencies against the PyPI advisory database instead.
|
|
135
|
+
pip-audit:
|
|
136
|
+
extends: .uv
|
|
137
|
+
stage: security
|
|
138
|
+
script:
|
|
139
|
+
- uv export --frozen --no-default-groups --no-emit-project
|
|
140
|
+
--format requirements-txt --output-file requirements.txt
|
|
141
|
+
- uv run pip-audit --strict --disable-pip --require-hashes
|
|
142
|
+
-r requirements.txt
|
|
143
|
+
|
|
144
|
+
# ------------------------------------------------------------------------------
|
|
145
|
+
# Build
|
|
146
|
+
# ------------------------------------------------------------------------------
|
|
147
|
+
|
|
148
|
+
build-package:
|
|
149
|
+
stage: build
|
|
150
|
+
script:
|
|
151
|
+
- uv build
|
|
152
|
+
artifacts:
|
|
153
|
+
paths: [dist/]
|
|
154
|
+
|
|
155
|
+
build-docs:
|
|
156
|
+
extends: .uv
|
|
157
|
+
stage: build
|
|
158
|
+
# cpdocs builds the API of every version in docs/cpdocs.yml from Git, so the
|
|
159
|
+
# job needs git, the full history and the branches. It documents the version
|
|
160
|
+
# named "main" from this checkout instead of origin/main: an MR pipeline
|
|
161
|
+
# then checks the API documentation of the code under review, and only the
|
|
162
|
+
# pipeline on main publishes it.
|
|
163
|
+
variables:
|
|
164
|
+
GIT_DEPTH: 0
|
|
165
|
+
CPDOCS_CURRENT_BRANCH: main
|
|
166
|
+
before_script:
|
|
167
|
+
- apt-get update -qq
|
|
168
|
+
- apt-get install -y -qq --no-install-recommends git
|
|
169
|
+
- git config --global --add safe.directory "$CI_PROJECT_DIR"
|
|
170
|
+
- git fetch --tags origin '+refs/heads/*:refs/remotes/origin/*'
|
|
171
|
+
- uv sync --locked --group docs
|
|
172
|
+
script:
|
|
173
|
+
- uv run properdocs build --strict
|
|
174
|
+
- mv build/site public
|
|
175
|
+
artifacts:
|
|
176
|
+
paths: [public/]
|
|
177
|
+
|
|
178
|
+
# ------------------------------------------------------------------------------
|
|
179
|
+
# Deploy
|
|
180
|
+
# ------------------------------------------------------------------------------
|
|
181
|
+
|
|
182
|
+
publish-package:
|
|
183
|
+
stage: deploy
|
|
184
|
+
needs:
|
|
185
|
+
- job: build-package
|
|
186
|
+
artifacts: true
|
|
187
|
+
- job: security-gate
|
|
188
|
+
artifacts: false
|
|
189
|
+
variables:
|
|
190
|
+
UV_PUBLISH_URL: "$CI_API_V4_URL/projects/$CI_PROJECT_ID/packages/pypi"
|
|
191
|
+
UV_PUBLISH_USERNAME: gitlab-ci-token
|
|
192
|
+
script:
|
|
193
|
+
- UV_PUBLISH_PASSWORD="$CI_JOB_TOKEN" uv publish dist/*
|
|
194
|
+
rules:
|
|
195
|
+
- if: $CI_COMMIT_TAG
|
|
196
|
+
|
|
197
|
+
deploy-pages:
|
|
198
|
+
stage: deploy
|
|
199
|
+
pages: true
|
|
200
|
+
needs:
|
|
201
|
+
- job: build-docs
|
|
202
|
+
artifacts: true
|
|
203
|
+
script:
|
|
204
|
+
- echo "Deploying keyloom documentation to GitLab Pages"
|
|
205
|
+
artifacts:
|
|
206
|
+
paths: [public/]
|
|
207
|
+
rules:
|
|
208
|
+
- if: $CI_COMMIT_BRANCH == "main"
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
30
|
+
|
|
31
|
+
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
32
|
+
|
|
33
|
+
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
34
|
+
|
|
35
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
36
|
+
|
|
37
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
38
|
+
|
|
39
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
40
|
+
|
|
41
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
42
|
+
|
|
43
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
44
|
+
|
|
45
|
+
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
46
|
+
|
|
47
|
+
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
48
|
+
|
|
49
|
+
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
50
|
+
|
|
51
|
+
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
|
|
52
|
+
|
|
53
|
+
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
54
|
+
|
|
55
|
+
END OF TERMS AND CONDITIONS
|
|
56
|
+
|
|
57
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
58
|
+
|
|
59
|
+
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
|
|
60
|
+
|
|
61
|
+
Copyright [yyyy] [name of copyright owner]
|
|
62
|
+
|
|
63
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
64
|
+
you may not use this file except in compliance with the License.
|
|
65
|
+
You may obtain a copy of the License at
|
|
66
|
+
|
|
67
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
68
|
+
|
|
69
|
+
Unless required by applicable law or agreed to in writing, software
|
|
70
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
71
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
72
|
+
See the License for the specific language governing permissions and
|
|
73
|
+
limitations under the License.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
SIL OPEN FONT LICENSE
|
|
2
|
+
|
|
3
|
+
Version 1.1 - 26 February 2007
|
|
4
|
+
|
|
5
|
+
PREAMBLE
|
|
6
|
+
|
|
7
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others.
|
|
8
|
+
|
|
9
|
+
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives.
|
|
10
|
+
|
|
11
|
+
DEFINITIONS
|
|
12
|
+
|
|
13
|
+
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation.
|
|
14
|
+
|
|
15
|
+
"Reserved Font Name" refers to any names specified as such after the copyright statement(s).
|
|
16
|
+
|
|
17
|
+
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s).
|
|
18
|
+
|
|
19
|
+
"Modified Version" refers to any derivative made by adding to, deleting, or substituting — in part or in whole — any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment.
|
|
20
|
+
|
|
21
|
+
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software.
|
|
22
|
+
|
|
23
|
+
PERMISSION & CONDITIONS
|
|
24
|
+
|
|
25
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions:
|
|
26
|
+
|
|
27
|
+
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself.
|
|
28
|
+
|
|
29
|
+
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user.
|
|
30
|
+
|
|
31
|
+
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users.
|
|
32
|
+
|
|
33
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission.
|
|
34
|
+
|
|
35
|
+
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software.
|
|
36
|
+
|
|
37
|
+
TERMINATION
|
|
38
|
+
|
|
39
|
+
This license becomes null and void if any of the above conditions are not met.
|
|
40
|
+
|
|
41
|
+
DISCLAIMER
|
|
42
|
+
|
|
43
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
|
keyloom-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: keyloom
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Field-level encryption for configuration files
|
|
5
|
+
Project-URL: Issues, https://github.com/seanergys/keyloom/issues
|
|
6
|
+
Author: Jayesh Badwaik
|
|
7
|
+
License-Expression: Apache-2.0 AND OFL-1.1
|
|
8
|
+
License-File: LICENSES/Apache-2.0.txt
|
|
9
|
+
License-File: LICENSES/OFL-1.1.txt
|
|
10
|
+
Requires-Python: >=3.11
|
|
11
|
+
Requires-Dist: cryptography>=44
|
|
12
|
+
Requires-Dist: ruamel-yaml>=0.18
|
|
13
|
+
Requires-Dist: tomlkit>=0.13
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
<!--
|
|
17
|
+
SPDX-FileCopyrightText: 2026 SEANERGYS Partners <https://seanergys.eu>
|
|
18
|
+
SPDX-License-Identifier: Apache-2.0
|
|
19
|
+
-->
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<img src="share/keyloom/brandkit/generated/logo-horizontal/svg/keyloom-logo-horizontal-color-on-transparent-none.svg" alt="keyloom" width="480">
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
Field-level encryption for configuration files: encrypt the secrets, keep the
|
|
26
|
+
rest readable.
|
|
27
|
+
|
|
28
|
+
- Documentation: https://seanergys.github.io/keyloom
|
|
29
|
+
- Issues: https://github.com/seanergys/keyloom/issues
|
|
30
|
+
|
|
31
|
+
keyloom is licensed under Apache-2.0.
|
keyloom-0.1.0/REUSE.toml
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# ------------------------------------------------------------------------------
|
|
2
|
+
# SPDX-FileCopyrightText: 2026 SEANERGYS Partners <https://seanergys.eu>
|
|
3
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
|
|
6
|
+
version = 1
|
|
7
|
+
|
|
8
|
+
# Generated by uv; it cannot carry a header of its own.
|
|
9
|
+
[[annotations]]
|
|
10
|
+
path = "uv.lock"
|
|
11
|
+
SPDX-FileCopyrightText = "2026 SEANERGYS Partners <https://seanergys.eu>"
|
|
12
|
+
SPDX-License-Identifier = "Apache-2.0"
|
|
13
|
+
|
|
14
|
+
# Brand variants written by brandgen from share/keyloom/source; PNG, PDF and
|
|
15
|
+
# the manifest cannot carry a header of their own.
|
|
16
|
+
[[annotations]]
|
|
17
|
+
path = "share/keyloom/brandkit/generated/**"
|
|
18
|
+
SPDX-FileCopyrightText = "2026 SEANERGYS Partners <https://seanergys.eu>"
|
|
19
|
+
SPDX-License-Identifier = "Apache-2.0"
|
|
20
|
+
|
|
21
|
+
# The brand font, ADLaM Display, distributed under its own licence.
|
|
22
|
+
[[annotations]]
|
|
23
|
+
path = "share/keyloom/source/*.ttf"
|
|
24
|
+
SPDX-FileCopyrightText = "2022 Microsoft"
|
|
25
|
+
SPDX-License-Identifier = "OFL-1.1"
|