-
Notifications
You must be signed in to change notification settings - Fork 35
chore(python): add pip lock file for reproducible builds #401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -185,7 +185,7 @@ jobs: | |
|
|
||
| - name: Upload staleness results | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| uses: actions/upload-artifact@b4b15b8c7c6e1ff4146713666d5ba77140d5c8da # v7.0.1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Critical: All 5 The official v7.0.1 release confirms commit This is a supply chain integrity regression — the correct SHA from Suggested fix: Revert all occurrences back to the original: uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
||
| with: | ||
| name: dependency-staleness-results | ||
| path: stale-dependencies.json | ||
|
|
@@ -232,7 +232,7 @@ jobs: | |
|
|
||
| - name: Upload OSSF Scorecard results | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| uses: actions/upload-artifact@b4b15b8c7c6e1ff4146713666d5ba77140d5c8da # v7.0.1 | ||
| with: | ||
| name: ossf-scorecard-results | ||
| path: scorecard-results.sarif | ||
|
|
@@ -264,7 +264,7 @@ jobs: | |
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| pip install --require-hashes -r requirements.lock | ||
|
|
||
| - name: Run AIO version check | ||
| id: aio-check | ||
|
|
@@ -274,6 +274,24 @@ jobs: | |
| --error-on-mismatch \ | ||
| --verbose | ||
|
|
||
| # Parse results for outputs | ||
| if [[ -f "aio-version-check-results.json" ]]; then | ||
| issues=$(jq '.issues | length' aio-version-check-results.json 2>/dev/null || echo "0") | ||
| echo "issues=$issues" >> $GITHUB_OUTPUT | ||
| echo "AIO version check completed with $issues issues" | ||
| else | ||
| echo "issues=0" >> $GITHUB_OUTPUT | ||
| echo "AIO version check completed (no results file)" | ||
| fi | ||
|
|
||
| - name: Upload AIO version results | ||
| if: always() | ||
| uses: actions/upload-artifact@b4b15b8c7c6e1ff4146713666d5ba77140d5c8da # v7.0.1 | ||
| with: | ||
| name: aio-version-check-results | ||
| path: aio-version-check-results.json | ||
| retention-days: 30 | ||
|
|
||
| # Comprehensive dependency pinning analysis | ||
|
Comment on lines
+277
to
295
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This new block parses As a result:
This is scope creep beyond the pip lock file objective. Please remove the "Parse results for outputs" block (lines 277–287) and the "Upload AIO version results" step (lines 289–295). If AIO result artifact upload is desired, open a separate PR that also modifies |
||
| security-analysis: | ||
| name: Security Analysis & Dashboard | ||
|
|
@@ -368,7 +386,7 @@ jobs: | |
|
|
||
| - name: Upload security analysis results | ||
| if: inputs.publish-artifacts | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| uses: actions/upload-artifact@b4b15b8c7c6e1ff4146713666d5ba77140d5c8da # v7.0.1 | ||
| with: | ||
| name: comprehensive-security-analysis | ||
| path: | | ||
|
|
@@ -461,7 +479,7 @@ jobs: | |
|
|
||
| - name: Upload comprehensive security summary | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| uses: actions/upload-artifact@b4b15b8c7c6e1ff4146713666d5ba77140d5c8da # v7.0.1 | ||
| with: | ||
| name: comprehensive-security-summary | ||
| path: comprehensive-security-summary.md | ||
|
|
||
|
nnadar12 marked this conversation as resolved.
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,7 +117,7 @@ jobs: | |
|
|
||
| - name: Upload staleness results | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| uses: actions/upload-artifact@b4b15b8c7c6e1ff4146713666d5ba77140d5c8da # v7.0.1 | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔴 Critical: Same issue as Suggested fix: Revert all occurrences: uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 |
||
| with: | ||
| name: dependency-staleness-results | ||
| path: stale-dependencies.json | ||
|
|
@@ -144,7 +144,7 @@ jobs: | |
|
|
||
| - name: Upload OSSF Scorecard results | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| uses: actions/upload-artifact@b4b15b8c7c6e1ff4146713666d5ba77140d5c8da # v7.0.1 | ||
| with: | ||
| name: ossf-scorecard-results | ||
| path: scorecard-results.sarif | ||
|
|
@@ -174,7 +174,7 @@ jobs: | |
| - name: Install dependencies | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install -r requirements.txt | ||
| pip install --require-hashes -r requirements.lock | ||
|
|
||
| - name: Run AIO version check | ||
| run: | | ||
|
|
@@ -183,6 +183,14 @@ jobs: | |
| --error-on-mismatch \ | ||
| --verbose | ||
|
|
||
| - name: Upload AIO version results | ||
| if: always() | ||
| uses: actions/upload-artifact@b4b15b8c7c6e1ff4146713666d5ba77140d5c8da # v7.0.1 | ||
| with: | ||
| name: aio-version-check-results | ||
| path: aio-version-check-results.json | ||
| retention-days: 30 | ||
|
|
||
|
Comment on lines
+186
to
+193
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same issue as |
||
| # Comprehensive security validation summary | ||
| security-validation-summary: | ||
| name: Security Validation Summary | ||
|
|
@@ -226,7 +234,7 @@ jobs: | |
|
|
||
| - name: Upload security summary | ||
| if: always() | ||
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | ||
| uses: actions/upload-artifact@b4b15b8c7c6e1ff4146713666d5ba77140d5c8da # v7.0.1 | ||
| with: | ||
| name: security-deployment-summary | ||
| path: security-summary.md | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -134,6 +134,10 @@ For detailed information about our CI/CD lint configuration and available linter | |
|
|
||
| ### Development Environment | ||
|
|
||
| **Prerequisites**: | ||
|
|
||
| - Install [uv](https://docs.astral.sh/uv/getting-started/installation/) for Python package management: `pip install uv` | ||
|
|
||
| We strongly recommend using the provided [DevContainer](./.devcontainer/README.md) for development work. The DevContainer: | ||
|
|
||
| - Ensures consistent tooling across all developers | ||
|
|
@@ -169,6 +173,17 @@ The guide covers: | |
| - Best practices for using Copilot with project-specific context | ||
| - Step-by-step examples for Infrastructure as Code development | ||
|
|
||
| ### Managing Python Dependencies | ||
|
|
||
| This project uses a hash-pinned `requirements.lock` file for reproducible Python dependency installation, satisfying the OSSF Silver Badge `build_repeatable` requirement. | ||
|
|
||
| **To update Python dependencies:** | ||
|
|
||
| 1. Update `requirements.txt` with new or modified dependency versions | ||
| 2. Run `uv pip compile --generate-hashes requirements.txt -o requirements.lock` to generate the lock file | ||
| 3. Commit both files: the updated `requirements.txt` and the generated `requirements.lock` | ||
|
nnadar12 marked this conversation as resolved.
Comment on lines
+178
to
+184
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The full dependency chain is: Suggested fix: **To update Python dependencies:**
1. Update `requirements.in` with new or modified dependency specifications
2. Run `pip-compile --generate-hashes --output-file=requirements.txt requirements.in` to regenerate the pinned requirements
3. Run `uv pip compile --generate-hashes requirements.txt -o requirements.lock` to regenerate the lock file
4. Commit all three files: `requirements.in`, `requirements.txt`, and `requirements.lock` |
||
| 4. The lock file ensures CI/CD pipelines and dev containers use exact pinned versions with SHA256 hashes for verified reproducible builds | ||
|
|
||
| ### HVE Core Integration | ||
|
|
||
| Edge-ai uses [hve-core](https://github.com/microsoft/hve-core) for general-purpose prompt engineering artifacts including standardized agents, prompts, and instructions for common development tasks (Bash, C#, Python, task planning, ADR creation, TDD workflows). | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.