workflowforge 1.1.2__tar.gz → 1.1.3__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.
Files changed (66) hide show
  1. workflowforge-1.1.3/.github/ISSUE_TEMPLATE/bug_report.yml +84 -0
  2. workflowforge-1.1.3/.github/ISSUE_TEMPLATE/config.yml +8 -0
  3. {workflowforge-1.1.2 → workflowforge-1.1.3}/.github/pull_request_template.md +25 -3
  4. {workflowforge-1.1.2 → workflowforge-1.1.3}/.gitignore +2 -2
  5. {workflowforge-1.1.2 → workflowforge-1.1.3}/.pre-commit-config.yaml +4 -4
  6. {workflowforge-1.1.2 → workflowforge-1.1.3}/CHANGELOG.md +10 -0
  7. workflowforge-1.1.3/CODE_OF_CONDUCT.md +54 -0
  8. workflowforge-1.1.3/CONTRIBUTING.md +83 -0
  9. {workflowforge-1.1.2 → workflowforge-1.1.3}/PKG-INFO +1 -1
  10. workflowforge-1.1.3/SECURITY.md +33 -0
  11. {workflowforge-1.1.2 → workflowforge-1.1.3}/pyproject.toml +1 -1
  12. {workflowforge-1.1.2 → workflowforge-1.1.3}/setup.py +1 -1
  13. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/__init__.py +1 -1
  14. workflowforge-1.1.3/src/workflowforge/schema_validation.py +186 -0
  15. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/visualization.py +2 -3
  16. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge.egg-info/PKG-INFO +1 -1
  17. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge.egg-info/SOURCES.txt +5 -0
  18. {workflowforge-1.1.2 → workflowforge-1.1.3}/tests/test_templates.py +12 -10
  19. workflowforge-1.1.2/src/workflowforge/schema_validation.py +0 -138
  20. {workflowforge-1.1.2 → workflowforge-1.1.3}/.flake8 +0 -0
  21. {workflowforge-1.1.2 → workflowforge-1.1.3}/.github/workflows/publish.yml +0 -0
  22. {workflowforge-1.1.2 → workflowforge-1.1.3}/AUTHORS.md +0 -0
  23. {workflowforge-1.1.2 → workflowforge-1.1.3}/LICENSE +0 -0
  24. {workflowforge-1.1.2 → workflowforge-1.1.3}/MANIFEST.in +0 -0
  25. {workflowforge-1.1.2 → workflowforge-1.1.3}/README.md +0 -0
  26. {workflowforge-1.1.2 → workflowforge-1.1.3}/README_PRECOMMIT.md +0 -0
  27. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/README.md +0 -0
  28. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/azure_devops/hello_world.py +0 -0
  29. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/azure_devops/hello_world.yml +0 -0
  30. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/azure_devops/python_ci.py +0 -0
  31. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/azure_devops/python_ci.yml +0 -0
  32. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/azure_devops/python_ci_scan.py +0 -0
  33. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/codebuild/buildspec.yml +0 -0
  34. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/codebuild/node_app.py +0 -0
  35. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/github_actions/basic_ci.py +0 -0
  36. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/github_actions/basic_ci.yml +0 -0
  37. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/github_actions/python_matrix.py +0 -0
  38. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/github_actions/python_matrix.yml +0 -0
  39. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/jenkins/Jenkinsfile +0 -0
  40. {workflowforge-1.1.2 → workflowforge-1.1.3}/examples/jenkins/maven_build.py +0 -0
  41. {workflowforge-1.1.2 → workflowforge-1.1.3}/setup.cfg +0 -0
  42. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/ai_documentation.py +0 -0
  43. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/azure_devops.py +0 -0
  44. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/codebuild.py +0 -0
  45. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/environment.py +0 -0
  46. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/github_actions_module.py +0 -0
  47. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/jenkins.py +0 -0
  48. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/jenkins_plugins.py +0 -0
  49. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/job.py +0 -0
  50. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/secrets.py +0 -0
  51. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/step.py +0 -0
  52. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/strategy.py +0 -0
  53. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/templates.py +0 -0
  54. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/triggers.py +0 -0
  55. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/validation.py +0 -0
  56. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge/workflow.py +0 -0
  57. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge.egg-info/dependency_links.txt +0 -0
  58. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge.egg-info/requires.txt +0 -0
  59. {workflowforge-1.1.2 → workflowforge-1.1.3}/src/workflowforge.egg-info/top_level.txt +0 -0
  60. {workflowforge-1.1.2 → workflowforge-1.1.3}/tests/__init__.py +0 -0
  61. {workflowforge-1.1.2 → workflowforge-1.1.3}/tests/test_ai_documentation.py +0 -0
  62. {workflowforge-1.1.2 → workflowforge-1.1.3}/tests/test_codebuild.py +0 -0
  63. {workflowforge-1.1.2 → workflowforge-1.1.3}/tests/test_jenkins.py +0 -0
  64. {workflowforge-1.1.2 → workflowforge-1.1.3}/tests/test_secrets.py +0 -0
  65. {workflowforge-1.1.2 → workflowforge-1.1.3}/tests/test_validation.py +0 -0
  66. {workflowforge-1.1.2 → workflowforge-1.1.3}/tests/test_workflow.py +0 -0
@@ -0,0 +1,84 @@
1
+ name: Bug Report
2
+ description: File a bug report to help us improve WorkflowForge
3
+ labels: [bug]
4
+ title: "bug: "
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to report an issue. Please fill out all required sections so we can triage quickly.
10
+ - type: input
11
+ id: summary
12
+ attributes:
13
+ label: Summary
14
+ description: Provide a concise description of the problem.
15
+ placeholder: Feature X fails when...
16
+ validations:
17
+ required: true
18
+ - type: textarea
19
+ id: steps
20
+ attributes:
21
+ label: Steps To Reproduce
22
+ description: List each action in order. Include command outputs or logs when helpful.
23
+ placeholder: |
24
+ 1. ...
25
+ 2. ...
26
+ 3. ...
27
+ validations:
28
+ required: true
29
+ - type: textarea
30
+ id: expected
31
+ attributes:
32
+ label: Expected Behavior
33
+ description: What did you expect to happen?
34
+ validations:
35
+ required: true
36
+ - type: textarea
37
+ id: actual
38
+ attributes:
39
+ label: Actual Behavior
40
+ description: What actually happened? Attach stack traces or screenshots if relevant.
41
+ validations:
42
+ required: true
43
+ - type: input
44
+ id: version
45
+ attributes:
46
+ label: WorkflowForge Version
47
+ description: Provide the exact version (e.g., 1.1.3). Run `python -c "import workflowforge; print(workflowforge.__version__)"`.
48
+ validations:
49
+ required: true
50
+ - type: dropdown
51
+ id: environment
52
+ attributes:
53
+ label: Runtime Environment
54
+ description: Where did you observe the issue?
55
+ options:
56
+ - GitHub Actions
57
+ - AWS CodeBuild
58
+ - Azure DevOps
59
+ - Jenkins
60
+ - Local environment
61
+ - Other
62
+ validations:
63
+ required: true
64
+ - type: textarea
65
+ id: environment-details
66
+ attributes:
67
+ label: Environment Details
68
+ description: Include OS, Python version, and relevant configuration snippets.
69
+ - type: checkboxes
70
+ id: validations
71
+ attributes:
72
+ label: Pre-Submission Checklist
73
+ options:
74
+ - label: I reproduced the issue on the latest `main` branch.
75
+ required: true
76
+ - label: I searched existing issues and discussions to avoid duplicates.
77
+ required: true
78
+ - label: I ran `black --check`, `flake8`, `mypy`, and `pytest` where applicable.
79
+ required: true
80
+ - type: textarea
81
+ id: extra
82
+ attributes:
83
+ label: Additional Context
84
+ description: Anything else we should know?
@@ -0,0 +1,8 @@
1
+ blank_issues_enabled: false
2
+ contact_links:
3
+ - name: Security Vulnerability
4
+ url: https://github.com/brainynimbus/workflowforge/security/policy
5
+ about: Please report security vulnerabilities through our coordinated disclosure program.
6
+ - name: Questions & Discussions
7
+ url: https://github.com/brainynimbus/workflowforge/discussions
8
+ about: For usage questions or ideas, start a discussion thread instead of opening an issue.
@@ -1,16 +1,21 @@
1
1
  # Pull Request
2
2
 
3
3
  ## 📋 PR Summary
4
+
4
5
  <!-- Provide a brief description of the changes in this PR -->
5
6
 
6
7
  ### Related Issues
8
+
7
9
  <!-- Link any related issues using keywords like "Fixes #123", "Closes #456", "Resolves #789" -->
10
+
8
11
  - Fixes #
9
12
  - Closes #
10
13
  - Resolves #
11
14
 
12
15
  ### Type of Change
16
+
13
17
  <!-- Check the type of change your PR introduces -->
18
+
14
19
  - [ ] 🐛 Bug fix (non-breaking change that fixes an issue)
15
20
  - [ ] ✨ New feature (non-breaking change that adds functionality)
16
21
  - [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
@@ -21,16 +26,21 @@
21
26
  - [ ] 🔨 Build/CI changes
22
27
 
23
28
  ## 🔍 What Changed
29
+
24
30
  <!-- Describe the changes in detail -->
25
31
 
26
32
  ### Before
33
+
27
34
  <!-- Describe the behavior before this change -->
28
35
 
29
36
  ### After
37
+
30
38
  <!-- Describe the behavior after this change -->
31
39
 
32
40
  ## 🧪 Testing
41
+
33
42
  <!-- Describe how you tested your changes -->
43
+
34
44
  - [ ] Unit tests pass (`pytest tests/`)
35
45
  - [ ] Code quality checks pass (`black`, `isort`, `flake8`, `mypy`)
36
46
  - [ ] Security scan passes (`bandit`)
@@ -38,9 +48,11 @@
38
48
  - [ ] Examples work correctly
39
49
 
40
50
  ### Test Evidence
51
+
41
52
  <!-- Provide evidence of testing (screenshots, logs, etc.) -->
42
53
 
43
54
  ## 📚 Documentation
55
+
44
56
  - [ ] Code is self-documenting with clear variable/function names
45
57
  - [ ] Docstrings added/updated for new functions/classes
46
58
  - [ ] README updated if needed
@@ -48,16 +60,20 @@
48
60
  - [ ] CHANGELOG.md updated
49
61
 
50
62
  ## 🔒 Security & Performance
63
+
51
64
  - [ ] No sensitive data exposed (credentials, tokens, etc.)
52
65
  - [ ] No performance regressions introduced
53
66
  - [ ] Dependencies are secure and up-to-date
54
67
  - [ ] Error handling is appropriate
55
68
 
56
69
  ## 🎯 Reviewer Guidance
70
+
57
71
  <!-- Help reviewers understand what to focus on -->
58
72
 
59
73
  ### Focus Areas
74
+
60
75
  <!-- What should reviewers pay special attention to? -->
76
+
61
77
  - [ ] Logic correctness
62
78
  - [ ] Error handling
63
79
  - [ ] Performance impact
@@ -66,20 +82,26 @@
66
82
  - [ ] Documentation clarity
67
83
 
68
84
  ### Testing Instructions
85
+
69
86
  <!-- Step-by-step instructions for reviewers to test your changes -->
87
+
88
+ 1.
89
+ 1.
70
90
  1.
71
- 2.
72
- 3.
73
91
 
74
92
  ## 📦 Deployment Notes
93
+
75
94
  <!-- Any special considerations for deployment -->
95
+
76
96
  - [ ] No database migrations required
77
97
  - [ ] No configuration changes required
78
98
  - [ ] Backward compatible
79
99
  - [ ] Safe to deploy immediately
80
100
 
81
101
  ## ✅ Pre-Merge Checklist
102
+
82
103
  <!-- All items must be checked before merge -->
104
+
83
105
  - [ ] PR title follows [Conventional Commits](https://www.conventionalcommits.org/) format
84
106
  - [ ] All CI checks are passing
85
107
  - [ ] Code has been reviewed and approved
@@ -87,6 +109,6 @@
87
109
  - [ ] Branch is up to date with target branch
88
110
  - [ ] All conversations resolved
89
111
 
90
- ---
112
+ ______________________________________________________________________
91
113
 
92
114
  **Note for Reviewers:** Please ensure all checklist items are completed before approving. Use "Request Changes" if any items are missing or if you have concerns.
@@ -121,9 +121,9 @@ celerybeat.pid
121
121
 
122
122
  # Environments
123
123
  .env
124
- .venv
124
+ .venv*
125
125
  env/
126
- venv/
126
+ venv
127
127
  ENV/
128
128
  env.bak/
129
129
  venv.bak/
@@ -1,7 +1,7 @@
1
1
  repos:
2
2
  # Basic file checks
3
3
  - repo: https://github.com/pre-commit/pre-commit-hooks
4
- rev: v5.0.0
4
+ rev: v6.0.0
5
5
  hooks:
6
6
  - id: check-yaml
7
7
  - id: end-of-file-fixer
@@ -9,7 +9,7 @@ repos:
9
9
 
10
10
  # Ruff (lints + fixes and formats)
11
11
  - repo: https://github.com/astral-sh/ruff-pre-commit
12
- rev: v0.12.0
12
+ rev: v0.13.1
13
13
  hooks:
14
14
  - id: ruff-check
15
15
  args: ["--fix"]
@@ -41,14 +41,14 @@ repos:
41
41
 
42
42
  # Conventional commits validation
43
43
  - repo: https://github.com/compilerla/conventional-pre-commit
44
- rev: v3.4.0
44
+ rev: v4.2.0
45
45
  hooks:
46
46
  - id: conventional-pre-commit
47
47
  stages: [commit-msg]
48
48
 
49
49
  # YAML linting for generated examples
50
50
  - repo: https://github.com/adrienverge/yamllint
51
- rev: v1.35.1
51
+ rev: v1.37.1
52
52
  hooks:
53
53
  - id: yamllint
54
54
  args: ["--config-data", "{extends: default, rules: {document-start: disable, line-length: {max: 120}, truthy: disable}}"]
@@ -5,6 +5,16 @@ All notable changes to WorkflowForge will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.1.3] - 2025-09-28
9
+
10
+ ### Added
11
+
12
+ - GitHub Actions workflow validator recognises reusable workflows, modern job-level fields, and recently introduced trigger events to stay aligned with GitHub's schema.
13
+
14
+ ### Fixed
15
+
16
+ - Template regression tests now assert expected matrix versions without tripping formatter inconsistencies across CI environments.
17
+
8
18
  ## [1.1.2] - 2025-08-30
9
19
 
10
20
  ### Changed
@@ -0,0 +1,54 @@
1
+ # Contributor Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in WorkflowForge a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behaviour that contributes to a positive environment include:
12
+
13
+ - Demonstrating empathy and kindness toward other people.
14
+ - Being respectful of differing opinions, viewpoints, and experiences.
15
+ - Giving and accepting constructive feedback gracefully.
16
+ - Accepting responsibility and apologising to those affected by our mistakes, and learning from the experience.
17
+ - Focusing on what is best not just for us as individuals, but for the overall community.
18
+
19
+ Examples of unacceptable behaviour include:
20
+
21
+ - The use of sexualised language or imagery, and sexual attention or advances of any kind.
22
+ - Trolling, insulting or derogatory comments, and personal or political attacks.
23
+ - Public or private harassment.
24
+ - Publishing others' private information, such as a physical or email address, without their explicit permission.
25
+ - Other conduct which could reasonably be considered inappropriate in a professional setting.
26
+
27
+ ## Enforcement Responsibilities
28
+
29
+ Project maintainers are responsible for clarifying and enforcing our standards of acceptable behaviour and will take appropriate and fair corrective action in response to any behaviour they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+ ## Scope
32
+
33
+ This Code of Conduct applies within all project spaces, and also applies when an individual is officially representing the project in public spaces.
34
+
35
+ ## Enforcement
36
+
37
+ Instances of abusive, harassing, or otherwise unacceptable behaviour may be reported to the project team at **conduct@brainynimbus.io**. All complaints will be reviewed and investigated promptly and fairly.
38
+
39
+ The project team is obligated to respect the privacy and security of the reporter of any incident.
40
+
41
+ ## Enforcement Guidelines
42
+
43
+ Project maintainers will follow these Community Impact Guidelines in determining the consequences for any action they deem to violate this Code of Conduct:
44
+
45
+ 1. **Correction** – A private, written warning, providing clarity around the nature of the violation and an explanation of why the behaviour was inappropriate.
46
+ 1. **Warning** – A formal warning with consequences for continued behaviour. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time.
47
+ 1. **Temporary Ban** – A temporary ban from any sort of interaction or public communication with the community for a specified period of time.
48
+ 1. **Permanent Ban** – A permanent ban from any sort of public interaction within the community.
49
+
50
+ ## Attribution
51
+
52
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
53
+
54
+ For answers to common questions about this code of conduct, see the [FAQ](https://www.contributor-covenant.org/faq) and [translations](https://www.contributor-covenant.org/translations).
@@ -0,0 +1,83 @@
1
+ # Contributing to WorkflowForge
2
+
3
+ We welcome contributions that improve WorkflowForge's developer experience, platform support, and documentation. This guide explains how to get started, follow our coding conventions, and submit high-quality pull requests.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Code of Conduct](#code-of-conduct)
8
+ - [Getting Started](#getting-started)
9
+ - [Development Workflow](#development-workflow)
10
+ - [Coding Standards](#coding-standards)
11
+ - [Testing Requirements](#testing-requirements)
12
+ - [Pull Request Checklist](#pull-request-checklist)
13
+ - [Release Process](#release-process)
14
+
15
+ ## Code of Conduct
16
+
17
+ Participation in this project is governed by the [Code of Conduct](CODE_OF_CONDUCT.md). Please read it carefully and report any concerns at once.
18
+
19
+ ## Getting Started
20
+
21
+ - Fork the repository and clone your fork.
22
+ - Create and activate a Python 3.11+ virtual environment:
23
+ ```bash
24
+ python3 -m venv .venv
25
+ source .venv/bin/activate
26
+ ```
27
+ - Install development dependencies:
28
+ ```bash
29
+ pip install -e .[dev]
30
+ pre-commit install
31
+ ```
32
+
33
+ ## Development Workflow
34
+
35
+ - Use feature branches named after the work you are doing (e.g., `feature/github-actions-schedules`).
36
+ - Keep commits small, focused, and rebased on the latest `main` branch.
37
+ - Follow the Conventional Commit format **with mandatory scopes**. Examples:
38
+ - `feat(github-actions): support reusable workflows`
39
+ - `fix(templates): correct matrix variable references`
40
+ - `docs(readme): clarify setup instructions`
41
+ - Open a pull request for your branch and fully complete the pull request template before requesting review.
42
+
43
+ ## Coding Standards
44
+
45
+ - **Formatting**: Use `black` (line length 88) and `isort` with the `black` profile.
46
+ - **Linting**: Run `flake8`, `ruff format`, and `ruff check` if available.
47
+ - **Typing**: Enforce `mypy --install-types --non-interactive src/`.
48
+ - **Security**: Execute `bandit -r src/` and `safety check --ignore-unpinned-requirements` for dependency audits.
49
+ - **Documentation**: Keep docstrings in English and favour concise, explanatory comments when needed.
50
+
51
+ ## Testing Requirements
52
+
53
+ Before opening a pull request, ensure the following pass locally:
54
+
55
+ ```bash
56
+ black --check src/ tests/
57
+ isort --check-only src/ tests/
58
+ flake8 src/ tests/ examples/
59
+ mypy --install-types --non-interactive src/
60
+ pytest tests/ --cov=workflowforge --cov-report=xml
61
+ bandit -r src/
62
+ safety check --ignore-unpinned-requirements
63
+ python -m build
64
+ python -m twine check dist/*
65
+ ```
66
+
67
+ Execute the runnable examples under `examples/` relevant to your change, especially when modifying templates or generators.
68
+
69
+ ## Pull Request Checklist
70
+
71
+ Include the completed pull request template to help reviewers understand scope and validation. Double-check that:
72
+
73
+ - [ ] The branch merges cleanly into `main`.
74
+ - [ ] All CI checks pass.
75
+ - [ ] Tests and linters were executed as listed above.
76
+ - [ ] Documentation (README, CHANGELOG, examples) was updated when behaviour changes.
77
+ - [ ] Commits follow `type(scope): description`.
78
+
79
+ ## Release Process
80
+
81
+ Maintainers: when preparing a release, update `pyproject.toml`, `src/workflowforge/__init__.py`, and `CHANGELOG.md` together. Tag releases with the `vX.Y.Z` format and verify the tag guard in `.github/workflows/publish.yml` passes before publishing.
82
+
83
+ Thank you for helping make WorkflowForge better!
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workflowforge
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python
5
5
  Author-email: "Brainy Nimbus, LLC" <info@brainynimbus.io>
6
6
  License: MIT
@@ -0,0 +1,33 @@
1
+ # Security Policy
2
+
3
+ ## Supported Versions
4
+
5
+ We release security fixes for the latest minor release of WorkflowForge. Patch updates are provided on a best-effort basis for earlier supported branches when the impact justifies the backport.
6
+
7
+ | Version | Supported |
8
+ | ------- | ---------------------- |
9
+ | 1.1.x | ✅ |
10
+ | 1.0.x | ⚠️ Critical fixes only |
11
+ | < 1.0 | ❌ |
12
+
13
+ ## Reporting a Vulnerability
14
+
15
+ We take security reports seriously. If you discover a vulnerability or suspect a security issue:
16
+
17
+ 1. Email **security@brainynimbus.io** with the subject line `WorkflowForge Security Report`.
18
+ 1. Provide a concise description, reproduction steps, and any potential impact.
19
+ 1. Encrypt sensitive details with our PGP key if possible. The key fingerprint and download link are available on <https://brainynimbus.io/security>.
20
+
21
+ We aim to acknowledge receipt within **2 business days** and to provide status updates every **7 days** until resolution.
22
+
23
+ ## Disclosure Process
24
+
25
+ - We coordinate a fix before public disclosure.
26
+ - Security advisories are posted in the GitHub Security Advisories section of the repository and referenced in the project changelog.
27
+ - Once a fix is available, we will publish patched releases and updated guidance. Please apply updates as soon as practical.
28
+
29
+ ## Responsible Use
30
+
31
+ If you need to perform penetration testing or security research, use isolated environments and avoid affecting production systems. Respect rate limits on our hosted endpoints.
32
+
33
+ Thank you for keeping WorkflowForge secure!
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "workflowforge"
7
- version = "1.1.2"
7
+ version = "1.1.3"
8
8
  description = "A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python"
9
9
  authors = [{name = "Brainy Nimbus, LLC", email = "info@brainynimbus.io"}]
10
10
  license = {text = "MIT"}
@@ -1,4 +1,4 @@
1
- from setuptools import find_packages, setup
1
+ from setuptools import setup
2
2
 
3
3
  setup(
4
4
  name="workflowforge",
@@ -11,7 +11,7 @@ from . import codebuild as aws_codebuild
11
11
  from . import github_actions_module as github_actions
12
12
  from . import jenkins as jenkins_platform
13
13
 
14
- __version__ = "1.1.2"
14
+ __version__ = "1.1.3"
15
15
  __all__ = [
16
16
  "github_actions",
17
17
  "jenkins_platform",
@@ -0,0 +1,186 @@
1
+ """GitHub Actions workflow validation helpers."""
2
+
3
+ from typing import Any
4
+
5
+ from ruamel.yaml import YAML
6
+
7
+ # GitHub Actions allows a long tail of events and fields. The goal here is to
8
+ # cover the most common ones while keeping the validator lightweight.
9
+ GITHUB_ACTIONS_SCHEMA = {
10
+ "required_fields": ["name", "on", "jobs"],
11
+ "valid_triggers": [
12
+ "branch_protection_rule",
13
+ "check_run",
14
+ "check_suite",
15
+ "create",
16
+ "delete",
17
+ "deployment",
18
+ "deployment_status",
19
+ "discussion",
20
+ "discussion_comment",
21
+ "fork",
22
+ "gollum",
23
+ "issues",
24
+ "issue_comment",
25
+ "label",
26
+ "merge_group",
27
+ "milestone",
28
+ "page_build",
29
+ "project",
30
+ "project_card",
31
+ "project_column",
32
+ "public",
33
+ "pull_request",
34
+ "pull_request_comment",
35
+ "pull_request_review",
36
+ "pull_request_review_comment",
37
+ "pull_request_target",
38
+ "push",
39
+ "registry_package",
40
+ "release",
41
+ "repository_dispatch",
42
+ "schedule",
43
+ "status",
44
+ "watch",
45
+ "workflow_call",
46
+ "workflow_dispatch",
47
+ "workflow_run",
48
+ ],
49
+ "valid_job_fields": [
50
+ "concurrency",
51
+ "container",
52
+ "continue-on-error",
53
+ "defaults",
54
+ "environment",
55
+ "env",
56
+ "if",
57
+ "name",
58
+ "needs",
59
+ "outputs",
60
+ "permissions",
61
+ "runs-on",
62
+ "secrets",
63
+ "services",
64
+ "steps",
65
+ "strategy",
66
+ "timeout-minutes",
67
+ "uses",
68
+ "with",
69
+ ],
70
+ "valid_step_fields": [
71
+ "continue-on-error",
72
+ "env",
73
+ "id",
74
+ "if",
75
+ "name",
76
+ "run",
77
+ "shell",
78
+ "timeout-minutes",
79
+ "uses",
80
+ "with",
81
+ "working-directory",
82
+ ],
83
+ }
84
+
85
+
86
+ def validate_github_actions_schema(workflow_dict: dict[str, Any]) -> list[str]:
87
+ """Validate a workflow dictionary against a curated GitHub Actions schema."""
88
+
89
+ errors: list[str] = []
90
+
91
+ if not isinstance(workflow_dict, dict):
92
+ return ["Workflow definition must be a mapping at the top level"]
93
+
94
+ # Ensure the top-level required fields are present.
95
+ for field in GITHUB_ACTIONS_SCHEMA["required_fields"]:
96
+ if field not in workflow_dict:
97
+ errors.append(f"Missing required field: {field}")
98
+
99
+ # Validate triggers and highlight unknown events.
100
+ on_value = workflow_dict.get("on")
101
+ if isinstance(on_value, str):
102
+ if on_value not in GITHUB_ACTIONS_SCHEMA["valid_triggers"]:
103
+ errors.append(f"Invalid trigger: {on_value}")
104
+ elif isinstance(on_value, dict):
105
+ for trigger in on_value.keys():
106
+ if trigger not in GITHUB_ACTIONS_SCHEMA["valid_triggers"]:
107
+ errors.append(f"Invalid trigger: {trigger}")
108
+
109
+ jobs = workflow_dict.get("jobs")
110
+ if not isinstance(jobs, dict):
111
+ if jobs is not None:
112
+ errors.append("'jobs' must be a mapping of job definitions")
113
+ return errors
114
+
115
+ for job_name, job_config in jobs.items():
116
+ if not isinstance(job_config, dict):
117
+ errors.append(f"Job '{job_name}' must be an object")
118
+ continue
119
+
120
+ if "runs-on" not in job_config and "uses" not in job_config:
121
+ errors.append(
122
+ f"Job '{job_name}' must define either 'runs-on' or 'uses' for reusable workflows"
123
+ )
124
+
125
+ for field in job_config.keys():
126
+ if field not in GITHUB_ACTIONS_SCHEMA["valid_job_fields"]:
127
+ errors.append(f"Invalid job field in '{job_name}': {field}")
128
+
129
+ steps = job_config.get("steps")
130
+ if steps is None:
131
+ # Reusable workflows are valid without explicit steps.
132
+ continue
133
+
134
+ if not isinstance(steps, list):
135
+ errors.append(f"Job '{job_name}' steps must be provided as a list")
136
+ continue
137
+
138
+ for index, step in enumerate(steps):
139
+ if not isinstance(step, dict):
140
+ errors.append(f"Step {index} in job '{job_name}' must be an object")
141
+ continue
142
+
143
+ if "uses" not in step and "run" not in step:
144
+ errors.append(
145
+ f"Step {index} in job '{job_name}' must include either 'uses' or 'run'"
146
+ )
147
+
148
+ for field in step.keys():
149
+ if field not in GITHUB_ACTIONS_SCHEMA["valid_step_fields"]:
150
+ errors.append(
151
+ f"Invalid step field in job '{job_name}', step {index}: {field}"
152
+ )
153
+
154
+ return errors
155
+
156
+
157
+ def validate_yaml_syntax(yaml_content: str) -> list[str]:
158
+ """Validate YAML syntax."""
159
+ errors = []
160
+ try:
161
+ yaml = YAML(typ="safe")
162
+ yaml.load(yaml_content)
163
+ except Exception as e:
164
+ errors.append(f"YAML syntax error: {str(e)}")
165
+ return errors
166
+
167
+
168
+ def validate_workflow_yaml(yaml_content: str) -> list[str]:
169
+ """Complete workflow validation."""
170
+ errors = []
171
+
172
+ # First validate YAML syntax
173
+ yaml_errors = validate_yaml_syntax(yaml_content)
174
+ if yaml_errors:
175
+ return yaml_errors
176
+
177
+ # Parse and validate structure
178
+ try:
179
+ yaml = YAML(typ="safe")
180
+ workflow_dict = yaml.load(yaml_content)
181
+ schema_errors = validate_github_actions_schema(workflow_dict)
182
+ errors.extend(schema_errors)
183
+ except Exception as e:
184
+ errors.append(f"Validation error: {str(e)}")
185
+
186
+ return errors
@@ -40,8 +40,7 @@ class PipelineVisualizer(BaseModel):
40
40
  # Triggers
41
41
  triggers = self._format_triggers(workflow.on)
42
42
  dot.append(
43
- f' trigger [label="Triggers\\n{triggers}", '
44
- "shape=ellipse, color=green];"
43
+ f' trigger [label="Triggers\\n{triggers}", shape=ellipse, color=green];'
45
44
  )
46
45
 
47
46
  # Jobs
@@ -74,7 +73,7 @@ class PipelineVisualizer(BaseModel):
74
73
  # Agent
75
74
  agent_info = self._format_jenkins_agent(pipeline.agent)
76
75
  dot.append(
77
- f' agent [label="Agent\\n{agent_info}", ' "shape=ellipse, color=blue];"
76
+ f' agent [label="Agent\\n{agent_info}", shape=ellipse, color=blue];'
78
77
  )
79
78
 
80
79
  # Stages
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workflowforge
3
- Version: 1.1.2
3
+ Version: 1.1.3
4
4
  Summary: A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python
5
5
  Author-email: "Brainy Nimbus, LLC" <info@brainynimbus.io>
6
6
  License: MIT
@@ -3,13 +3,18 @@
3
3
  .pre-commit-config.yaml
4
4
  AUTHORS.md
5
5
  CHANGELOG.md
6
+ CODE_OF_CONDUCT.md
7
+ CONTRIBUTING.md
6
8
  LICENSE
7
9
  MANIFEST.in
8
10
  README.md
9
11
  README_PRECOMMIT.md
12
+ SECURITY.md
10
13
  pyproject.toml
11
14
  setup.py
12
15
  .github/pull_request_template.md
16
+ .github/ISSUE_TEMPLATE/bug_report.yml
17
+ .github/ISSUE_TEMPLATE/config.yml
13
18
  .github/workflows/publish.yml
14
19
  examples/README.md
15
20
  examples/azure_devops/hello_world.py
@@ -20,11 +20,12 @@ def test_python_ci_template():
20
20
  assert "strategy" in parsed["jobs"]["test"]
21
21
  # Ensure matrix variable name matches the matrix key (python_version)
22
22
  steps = parsed["jobs"]["test"]["steps"]
23
- setup_steps = [s for s in steps if s.get("uses") == "actions/setup-python@v5"]
24
- assert setup_steps, "Missing actions/setup-python@v5 step"
25
- assert (
26
- setup_steps[0]["with"]["python-version"] == "${{ matrix.python_version }}"
27
- ), "setup-python should reference matrix.python_version"
23
+ setup_step = next(
24
+ (step for step in steps if step.get("uses") == "actions/setup-python@v5"),
25
+ None,
26
+ )
27
+ assert setup_step, "Missing actions/setup-python@v5 step"
28
+ assert setup_step["with"]["python-version"] == "${{ matrix.python_version }}"
28
29
 
29
30
 
30
31
  def test_docker_build_template():
@@ -47,8 +48,9 @@ def test_node_ci_template():
47
48
  assert "test" in parsed["jobs"]
48
49
  # Ensure matrix variable name matches the matrix key (node_version)
49
50
  steps = parsed["jobs"]["test"]["steps"]
50
- setup_steps = [s for s in steps if s.get("uses") == "actions/setup-node@v4"]
51
- assert setup_steps, "Missing actions/setup-node@v4 step"
52
- assert (
53
- setup_steps[0]["with"]["node-version"] == "${{ matrix.node_version }}"
54
- ), "setup-node should reference matrix.node_version"
51
+ setup_step = next(
52
+ (step for step in steps if step.get("uses") == "actions/setup-node@v4"),
53
+ None,
54
+ )
55
+ assert setup_step, "Missing actions/setup-node@v4 step"
56
+ assert setup_step["with"]["node-version"] == "${{ matrix.node_version }}"
@@ -1,138 +0,0 @@
1
- """GitHub Actions schema validation."""
2
-
3
- from typing import Any
4
-
5
- from ruamel.yaml import YAML
6
-
7
- # Simplified GitHub Actions schema validation
8
- GITHUB_ACTIONS_SCHEMA = {
9
- "required_fields": ["name", "on", "jobs"],
10
- "valid_triggers": [
11
- "push",
12
- "pull_request",
13
- "release",
14
- "schedule",
15
- "workflow_dispatch",
16
- "workflow_call",
17
- "issues",
18
- "issue_comment",
19
- "create",
20
- "delete",
21
- ],
22
- "valid_job_fields": [
23
- "runs-on",
24
- "steps",
25
- "needs",
26
- "if",
27
- "strategy",
28
- "environment",
29
- "permissions",
30
- "outputs",
31
- "env",
32
- "defaults",
33
- "timeout-minutes",
34
- ],
35
- "valid_step_fields": [
36
- "name",
37
- "uses",
38
- "run",
39
- "with",
40
- "env",
41
- "if",
42
- "id",
43
- "continue-on-error",
44
- ],
45
- }
46
-
47
-
48
- def validate_github_actions_schema(workflow_dict: dict[str, Any]) -> list[str]:
49
- """Validate workflow against GitHub Actions schema."""
50
- errors = []
51
-
52
- # Check required fields
53
- for field in GITHUB_ACTIONS_SCHEMA["required_fields"]:
54
- if field not in workflow_dict:
55
- errors.append(f"Missing required field: {field}")
56
-
57
- # Validate triggers
58
- if "on" in workflow_dict:
59
- on_value = workflow_dict["on"]
60
- if isinstance(on_value, str):
61
- if on_value not in GITHUB_ACTIONS_SCHEMA["valid_triggers"]:
62
- errors.append(f"Invalid trigger: {on_value}")
63
- elif isinstance(on_value, dict):
64
- for trigger in on_value.keys():
65
- if trigger not in GITHUB_ACTIONS_SCHEMA["valid_triggers"]:
66
- errors.append(f"Invalid trigger: {trigger}")
67
-
68
- # Validate jobs
69
- if "jobs" in workflow_dict:
70
- for job_name, job_config in workflow_dict["jobs"].items():
71
- if not isinstance(job_config, dict):
72
- errors.append(f"Job '{job_name}' must be an object")
73
- continue
74
-
75
- # Check required job fields
76
- if "runs-on" not in job_config:
77
- errors.append(f"Job '{job_name}' missing required 'runs-on' field")
78
-
79
- # Validate job fields
80
- for field in job_config.keys():
81
- if field not in GITHUB_ACTIONS_SCHEMA["valid_job_fields"]:
82
- errors.append(f"Invalid job field in '{job_name}': {field}")
83
-
84
- # Validate steps
85
- if "steps" in job_config:
86
- for i, step in enumerate(job_config["steps"]):
87
- if not isinstance(step, dict):
88
- errors.append(f"Step {i} in job '{job_name}' must be an object")
89
- continue
90
-
91
- # Must have either 'uses' or 'run'
92
- if "uses" not in step and "run" not in step:
93
- errors.append(
94
- f"Step {i} in job '{job_name}' must have "
95
- "either 'uses' or 'run'"
96
- )
97
-
98
- # Validate step fields
99
- for field in step.keys():
100
- if field not in GITHUB_ACTIONS_SCHEMA["valid_step_fields"]:
101
- errors.append(
102
- f"Invalid step field in job '{job_name}', "
103
- f"step {i}: {field}"
104
- )
105
-
106
- return errors
107
-
108
-
109
- def validate_yaml_syntax(yaml_content: str) -> list[str]:
110
- """Validate YAML syntax."""
111
- errors = []
112
- try:
113
- yaml = YAML(typ="safe")
114
- yaml.load(yaml_content)
115
- except Exception as e:
116
- errors.append(f"YAML syntax error: {str(e)}")
117
- return errors
118
-
119
-
120
- def validate_workflow_yaml(yaml_content: str) -> list[str]:
121
- """Complete workflow validation."""
122
- errors = []
123
-
124
- # First validate YAML syntax
125
- yaml_errors = validate_yaml_syntax(yaml_content)
126
- if yaml_errors:
127
- return yaml_errors
128
-
129
- # Parse and validate structure
130
- try:
131
- yaml = YAML(typ="safe")
132
- workflow_dict = yaml.load(yaml_content)
133
- schema_errors = validate_github_actions_schema(workflow_dict)
134
- errors.extend(schema_errors)
135
- except Exception as e:
136
- errors.append(f"Validation error: {str(e)}")
137
-
138
- return errors
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes