Skip to content

Add configurable security policy engine - #315

Open
ramya2006sri wants to merge 6 commits into
ionfwsrijan:mainfrom
ramya2006sri:feature/security-policy-engine
Open

Add configurable security policy engine#315
ramya2006sri wants to merge 6 commits into
ionfwsrijan:mainfrom
ramya2006sri:feature/security-policy-engine

Conversation

@ramya2006sri

Copy link
Copy Markdown

Before opening: make sure there is an issue tracking this work, and link it below. PRs without a linked issue may be closed without review.

Linked issue

Closes #140

What this PR does

Adds a configurable security policy engine that allows users to upload YAML policy files during scans. Uploaded policies are parsed and evaluated against scan findings, and the evaluation result is included in the scan status.

Type of change

  • Bug fix
  • New feature
  • ML model / training pipeline
  • Refactor (no behaviour change)
  • Documentation
  • Tests only

ML tier (if applicable)

  • Tier 1 — Triage
  • Tier 2 — Predictive
  • Tier 3 — Autonomous
  • Not ML-related

Stack affected

  • Backend
  • Frontend
  • Both

Changes

Backend

  • Added YAML policy parser.
  • Added security policy evaluation engine.
  • Added optional policy file upload to the /scan endpoint.
  • Evaluates scan findings against uploaded policies.
  • Stores policy evaluation results in the scan status.
  • Added parser and evaluator unit tests.

Frontend

  • No frontend changes.

New dependencies

  • PyYAML

Database / schema changes

  • None

Testing

How did you test this?

  • Parsed sample YAML policies successfully.
  • Executed parser unit tests.
  • Executed policy engine unit tests.
  • Verified policy evaluation during scan.
  • Verified project compilation.

Checklist

  • Tested locally end-to-end (upload ZIP or GitHub URL → scan → findings returned correctly)
  • New ML model falls back gracefully when model file is absent
  • No new console.error or unhandled Python exceptions introduced
  • Added or updated tests where applicable
  • requirements.txt / package.json updated if new dependencies added
  • New model files (.pkl, .pt, etc.) are gitignored, not committed

Anything reviewers should focus on

Please review the YAML policy parsing, policy evaluation logic, and integration with the scan workflow to ensure policy rules are correctly evaluated and reported.

Screenshots (if UI changed)

N/A (Backend-only changes)

@github-actions

Copy link
Copy Markdown

🎉 Thank you @ramya2006sri for submitting a Pull Request!

We're excited to review your contribution.

Before Review

✅ Ensure all CI checks pass
✅ Complete the PR template
✅ Link the related issue

Want faster reviews and contributor support?

Join our Discord community:

🔗 https://discord.gg/FcXuyw2Rs

Maintainers and mentors are active there and can help resolve blockers quickly.

Happy Contributing! 🚀

@github-actions github-actions Bot added backend Backend issues feature New feature frontend Frontend issues SSoC26 labels Jul 12, 2026
@github-actions
github-actions Bot requested a review from arpit2006 July 12, 2026 12:02
@github-actions

Copy link
Copy Markdown

PR template check passed!

@arpit2006 this PR is ready for your review. 🚀

@github-actions

Copy link
Copy Markdown

PR template check passed!

@arpit2006 this PR is ready for your review. 🚀

@arpit2006

Copy link
Copy Markdown
Collaborator

@ramya2006sri , Please Resolve CI and Quality issue

@arpit2006 arpit2006 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please Resolve CI Fail and Quality gate.

git push --force-with-lease origin feature/security-policy-engine#:wq
@github-actions
github-actions Bot requested a review from arpit2006 July 12, 2026 18:24
@github-actions

Copy link
Copy Markdown

PR template check passed!

@arpit2006 this PR is ready for your review. 🚀

@arpit2006 arpit2006 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix CI fails

@github-actions
github-actions Bot requested a review from arpit2006 July 17, 2026 13:10
@github-actions

Copy link
Copy Markdown

PR template check passed!

@arpit2006 this PR is ready for your review. 🚀

1 similar comment
@github-actions

Copy link
Copy Markdown

PR template check passed!

@arpit2006 this PR is ready for your review. 🚀

@ramya2006sri
ramya2006sri force-pushed the feature/security-policy-engine branch from 9008ed6 to e371c7c Compare July 19, 2026 16:25
@github-actions

Copy link
Copy Markdown

PR template check passed!

@arpit2006 this PR is ready for your review. 🚀

@github-actions

Copy link
Copy Markdown

PR template check passed!

@arpit2006 this PR is ready for your review. 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend issues feature New feature frontend Frontend issues SSoC26

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Security Policy Engine for Custom Compliance Enforcement

2 participants