Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5b65c26
refactor(epm): introduce baseline policies.
ciaracarey Feb 18, 2026
b82b6e3
Add OPA test
ciaracarey Feb 19, 2026
ddfb697
fix formatting opa errors
Feb 19, 2026
2747c24
Improving the rego and moving test to workflows
Feb 19, 2026
809db09
Update opa-lint.yml
ciaracarey Feb 19, 2026
cbb09cd
Refactor vulnerability matching and scoring logic
ciaracarey Feb 25, 2026
f9d5338
opa formatting fixes
Feb 25, 2026
8bde0eb
update vulnerability policy to use osv object
Mar 4, 2026
9522986
update vulnerability policy
Mar 4, 2026
6bfd1ac
Update README.md
ciaracarey Mar 5, 2026
c300edb
Update .github/workflows/opa-lint.yml
ciaracarey Mar 5, 2026
aebc6ce
Update .github/workflows/opa-lint.yml
ciaracarey Mar 5, 2026
d1a8e18
fix(readme): wrap repository structure in fenced code block (#16)
Copilot Mar 5, 2026
97fbe8f
Fix Americanized spelling in README (#17)
Copilot Mar 5, 2026
2c7cc2f
Remove `import rego.v1` from advanced/huggingface-recipes policies (#18)
Copilot Mar 5, 2026
0df6c6f
change name from cooldown to pacage age
ciaracarey Mar 5, 2026
a1e39c4
Simplify vulnerability policy
Mar 10, 2026
fcdb540
adding the GitOps exemption workflow
Mar 10, 2026
9094bee
Change branch for exemption application workflow
ciaracarey Mar 11, 2026
1b32611
Add python:time:3.4.5 to allow.json
ciaracarey Mar 11, 2026
783e2f6
Update high-risk-vulnerability.rego
ciaracarey Mar 11, 2026
65fcd3c
Document GitOps workflow for policy exemptions
ciaracarey Mar 11, 2026
2d9911a
add regal step to lint rego
markmcmurray Mar 10, 2026
ced740b
tidy rego based on regal output
markmcmurray Mar 10, 2026
10f6b28
relint high-risk-vulnerability
markmcmurray Mar 11, 2026
275f10a
fix unsafe var introduced by linting fix
markmcmurray Mar 11, 2026
dfe0439
Merge pull request #22 from cloudsmith-io/rego-styling-with-ci
markmcmurray Mar 11, 2026
d98b345
remove leftover rego.v1 imports
markmcmurray Mar 11, 2026
804341b
add unit tests for rego
markmcmurray Mar 10, 2026
d934db4
Apply suggestion from @Copilot
markmcmurray Mar 11, 2026
08baf59
Merge pull request #23 from cloudsmith-io/rego-unit-tests
markmcmurray Mar 11, 2026
3e6137e
Update baseline/license-compliance.rego
ciaracarey Mar 11, 2026
c85bc8a
Update exemptions/update_policy.py
ciaracarey Mar 11, 2026
191d72b
Update README.md
ciaracarey Mar 11, 2026
94e8c0e
Update .github/workflows/apply-exemptions.yml
ciaracarey Mar 11, 2026
2cdfee8
Initial plan
Copilot Mar 11, 2026
b436490
Add explicit timeout and retry/backoff to Cloudsmith API requests
Copilot Mar 11, 2026
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
39 changes: 39 additions & 0 deletions .github/workflows/apply-exemptions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Apply EPM Exemptions

on:
push:
branches: [epm-baseline-refactor, main]
paths:
- "exemptions/allow.json"

permissions:
contents: read
id-token: write

jobs:
apply:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Cloudsmith OIDC login
uses: cloudsmith-io/cloudsmith-cli-action@v1.0.2
with:
oidc-namespace: ${{ vars.CLOUDSMITH_WORKSPACE }}
oidc-service-slug: ${{ vars.CLOUDSMITH_SERVICE }}
oidc-auth-only: "true"

- name: Install dependencies
run: pip install requests

- name: Apply exemptions
env:
CLOUDSMITH_WORKSPACE: ${{ vars.CLOUDSMITH_WORKSPACE }}
ALLOW_POLICY_SLUG: ${{ secrets.ALLOW_POLICY_SLUG }}
CLOUDSMITH_TOKEN: ${{ env.CLOUDSMITH_API_KEY }}
run: python exemptions/update_policy.py
62 changes: 62 additions & 0 deletions .github/workflows/opa-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: OPA Lint & Validate

on:
pull_request:
push:
branches: [main, epm-baseline-refactor]

jobs:
opa:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Install OPA
run: |
curl -L -o opa https://openpolicyagent.org/downloads/latest/opa_linux_amd64_static
chmod +x opa
sudo mv opa /usr/local/bin/

- name: Show OPA Version
run: opa version

- name: Format Check
run: |
if [ -d baseline ]; then
opa fmt --fail baseline
else
echo "No baseline folder"
fi
if [ -d advanced ]; then
opa fmt --fail advanced
else
echo "No advanced folder"
fi

- name: Install Regal
run: |
curl -L -o regal https://github.com/StyraInc/regal/releases/latest/download/regal_Linux_x86_64
chmod +x regal
sudo mv regal /usr/local/bin/regal

- name: Lint with Regal
run: regal lint baseline advanced

- name: Validate Policies
run: |
find baseline advanced -name "*.rego" -print0 | \
while IFS= read -r -d '' file; do
echo "Checking $file"
opa check "$file"
done

- name: Unit Test Policies
run: |
find baseline advanced -name "*_test.rego" -print0 | \
while IFS= read -r -d '' test_file; do
policy="${test_file/_test/}"
echo "Testing $test_file"
opa test "$policy" "$test_file"
done

208 changes: 208 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,208 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[codz]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py.cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# UV
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
#uv.lock

# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
#poetry.toml

# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
#pdm.lock
#pdm.toml
.pdm-python
.pdm-build/

# pixi
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
#pixi.lock
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
# in the .venv directory. It is recommended not to include this directory in version control.
.pixi

# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.envrc
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
exemptions/*.local.json

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/

# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

# Abstra
# Abstra is an AI-powered process automation framework.
# Ignore directories containing user credentials, local state, and settings.
# Learn more at https://abstra.io/docs
.abstra/

# Visual Studio Code
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
# and can be added to the global gitignore or merged into this file. However, if you prefer,
# you could uncomment the following to ignore the entire vscode folder
# .vscode/

# Ruff stuff:
.ruff_cache/

# PyPI configuration file
.pypirc

# Cursor
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
# refer to https://docs.cursor.com/context/ignore-files
.cursorignore
.cursorindexingignore

# Marimo
marimo/_static/
marimo/_lsp/
__marimo__/
12 changes: 12 additions & 0 deletions .regal/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
rules:
idiomatic:
directory-package-mismatch:
# All policies use `package cloudsmith` as required by the Cloudsmith EPM runtime
level: ignore
no-defined-entrypoint:
# Entrypoints are determined by the EPM system, not metadata annotations
level: ignore
style:
messy-rule:
# `default match := false` + `match if { ... }` is the required EPM policy interface
level: ignore
Loading