Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
4 changes: 2 additions & 2 deletions .github/skills/experimental/powerpoint/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ compatibility: 'Requires uv, Python 3.11+, PowerShell 7+, and LibreOffice'
metadata:
authors: "microsoft/hve-core"
spec_version: "1.0"
last_updated: "2026-03-18"
last_updated: "2026-07-31"
---

# PowerPoint Skill
Expand Down Expand Up @@ -460,7 +460,7 @@ python scripts/embed_audio.py \

Embeds WAV audio files into PPTX slides. Audio files are matched to slides by naming convention (`slide-001.wav`, `slide-002.wav`, etc.). The audio icon is placed off-screen (below the slide boundary) to keep it hidden during presentation. Pass `--slides` to embed audio on specific slides only.

**Dependencies**: Requires `pillow` (`pip install pillow`) for poster frame generation.
**Dependencies**: Requires `pillow` (`uv pip install pillow`) for poster frame generation.

> [!NOTE]
> WAV files are embedded uncompressed. For large narrated decks, consider pre-compressing audio before embedding to manage PPTX file size.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def filter_pdf_pages(pdf_path: Path, pages: list[int], output_path: Path) -> Pat
import fitz # noqa: PLC0415 — PyMuPDF
except ImportError:
logger.error(
"PyMuPDF is required for slide filtering. Install via: pip install pymupdf"
"PyMuPDF is required for slide filtering. Install via: uv pip install pymupdf"
)
sys.exit(EXIT_FAILURE)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def export_pdf_to_svg(
import fitz # noqa: F401, PLC0415 — PyMuPDF availability check
except ImportError as e:
raise PyMuPDFError(
"PyMuPDF is required for SVG export. Install via: pip install pymupdf"
"PyMuPDF is required for SVG export. Install via: uv pip install pymupdf"
) from e

try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def render_pages(
try:
import fitz # noqa: F401, PLC0415 — PyMuPDF availability check
except ImportError:
logger.error("PyMuPDF is required. Install via: pip install pymupdf")
logger.error("PyMuPDF is required. Install via: uv pip install pymupdf")
sys.exit(EXIT_FAILURE)

output_dir.mkdir(parents=True, exist_ok=True)
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/beval.yml
Comment thread
PratikWayase marked this conversation as resolved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Current main intentionally deleted this workflow in PR #2552 when beval was retired in favor of Vally agent-conformance suites. Please merge current main, accept this file's deletion, and remove the obsolete beval hunk from this PR. The replacement workflow does not install beval, so this install change does not need to be migrated.

Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,14 @@
npm ci --prefix evals/beval
echo "${{ github.workspace }}/evals/beval/node_modules/.bin" >> "$GITHUB_PATH"

- name: Install uv
uses: astral-sh/setup-uv@c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is a pre-existing pattern in the repository: astral-sh/setup-uv at this same commit SHA is already used in eval-validation.yml, fuzz-tests.yml, and pytest-tests.yml. This PR adds one more usage of an already-accepted pattern.

The action is pinned to a full commit SHA (c771a70e6277c0a99b617c7a806ffedaca235ff9 # v9.0.0), which is the repo's mitigating control for unverified actions. To fully resolve the underlying concern, the repo could replace the action with a manual install step (curl -LsSf https://astral.sh/uv/install.sh | sh) or add astral-sh/setup-uv to a poutine allowlist. Either is a repo-level decision beyond the scope of this PR.


- name: Install beval
# beval is hosted under a personal account (vyta) while an org-owned
# home is evaluated. The install is pinned to a specific commit SHA to
# mitigate supply-chain risk in the interim.
run: pip install --no-cache-dir "beval[all] @ git+https://github.com/vyta/beval.git@d9f46c24f03b0b806d928a8a8ce2fc66d8e470fb#subdirectory=python"
run: uv pip install --system --no-cache-dir "beval[all] @ git+https://github.com/vyta/beval.git@d9f46c24f03b0b806d928a8a8ce2fc66d8e470fb#subdirectory=python"

- name: Start agent (TCP)
env:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/pip-install-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Pip Install Lint
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed

on:
workflow_call:
Comment thread
PratikWayase marked this conversation as resolved.

permissions:
contents: read

jobs:
check-bare-pip-install:

Check failure on line 10 in .github/workflows/pip-install-lint.yml

View workflow job for this annotation

GitHub Actions / Workflow Permissions Check / Workflow Permissions Check

Job 'check-bare-pip-install' in workflow 'pip-install-lint.yml' is missing its own permissions block and implicitly inherits the workflow-level grant

Check failure on line 10 in .github/workflows/pip-install-lint.yml

View workflow job for this annotation

GitHub Actions / Workflow Permissions Check / Workflow Permissions Check

Job 'check-bare-pip-install' in workflow 'pip-install-lint.yml' is missing its own permissions block and implicitly inherits the workflow-level grant
name: Check for bare pip install
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Comment on lines +23 to +24

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This job executes a PR-controlled script immediately after checkout, but checkout credentials are persisted by default. Disable credential persistence so modified PR code cannot recover the read token and to follow the repository's workflow credential convention.

Suggested change
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false


- name: Run bare pip install lint check
run: pwsh -File scripts/linting/Invoke-PipInstallLint.ps1
5 changes: 5 additions & 0 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
with:
soft-fail: false

pip-install-lint:

Check failure on line 30 in .github/workflows/pr-validation.yml

View workflow job for this annotation

GitHub Actions / Workflow Permissions Check / Workflow Permissions Check

Job 'pip-install-lint' in workflow 'pr-validation.yml' is missing its own permissions block and implicitly inherits the workflow-level grant

Check failure on line 30 in .github/workflows/pr-validation.yml

View workflow job for this annotation

GitHub Actions / Workflow Permissions Check / Workflow Permissions Check

Job 'pip-install-lint' in workflow 'pr-validation.yml' is missing its own permissions block and implicitly inherits the workflow-level grant
name: Pip Install Lint
uses: ./.github/workflows/pip-install-lint.yml

markdown-lint:
name: Markdown Lint
uses: ./.github/workflows/markdown-lint.yml
Expand Down Expand Up @@ -485,6 +489,7 @@
- node-tests
- fuzz-tests
- pip-audit
- pip-install-lint
- docusaurus-tests
- frontmatter-validation
- adr-consistency-validation
Expand Down
114 changes: 114 additions & 0 deletions scripts/linting/Invoke-PipInstallLint.ps1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The scanner misses several maintained repository surfaces: .sh is absent from the extension allowlist, the segment-wide evals exclusion also suppresses scripts/evals, and the default traversal misses hidden .github content outside workflows. I reproduced bare installs in all three surfaces passing with exit code 0. Please enumerate tracked files deterministically, include executable shell formats, narrow the eval exclusion to the intended corpus, and add regression tests for these paths.

Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Copyright (c) 2026 Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT

<#
.SYNOPSIS
Lint script to detect bare 'pip install' calls.
The repository follows a 'uv-first' Python convention.
#>

param(
[string]$TestDirectory = ""
Comment thread
PratikWayase marked this conversation as resolved.
Outdated
)

$ErrorActionPreference = "Stop"

$script:ExcludeDirs = @(".git", "evals", ".venv", "venv", "env", "node_modules", "__pycache__")
$script:ExcludeFiles = @("THIRD-PARTY-NOTICES", "Invoke-PipInstallLint.ps1", "Invoke-PipInstallLint.Tests.ps1")
$script:Violations = @()
$script:ScannedFiles = @{}

function script:Should-Exclude {

Check warning on line 21 in scripts/linting/Invoke-PipInstallLint.ps1

View workflow job for this annotation

GitHub Actions / PowerShell Lint / PowerShell Lint

PSUseApprovedVerbs: The cmdlet 'Should-Exclude' uses an unapproved verb.
param([string]$Path)
$normalizedPath = $Path.Replace("\", "/").ToLowerInvariant()

foreach ($dir in $script:ExcludeDirs) {
if ($normalizedPath -match "(^|/)$dir(/|$)") { return $true }
}
foreach ($file in $script:ExcludeFiles) {
if ($normalizedPath -match "(^|/)$file(/|$)") { return $true }
Comment thread
PratikWayase marked this conversation as resolved.
Outdated
}
return $false
}

function script:Scan-File {

Check warning on line 34 in scripts/linting/Invoke-PipInstallLint.ps1

View workflow job for this annotation

GitHub Actions / PowerShell Lint / PowerShell Lint

PSUseApprovedVerbs: The cmdlet 'Scan-File' uses an unapproved verb.
param([string]$FilePath)

$normalizedPath = $FilePath.Replace("\", "/")
if ($script:ScannedFiles.ContainsKey($normalizedPath)) { return }
$script:ScannedFiles[$normalizedPath] = $true

if (script:Should-Exclude -Path $FilePath) { return }

$ext = [System.IO.Path]::GetExtension($FilePath).ToLowerInvariant()
if ($ext -notin @(".py", ".ps1", ".yml", ".yaml", ".md", "")) { return }

try {
$lines = Get-Content -Path $FilePath -Raw -ErrorAction SilentlyContinue
if (-not $lines) { return }

$lineNumber = 1
foreach ($line in $lines -split "`r?`n") {
$strippedLine = $line.Trim()

if ([string]::IsNullOrWhiteSpace($strippedLine)) {
$lineNumber++
continue
}

if ($line -match "#\s*pip-install-ok\b" -or $line -match "<!--\s*pip-install-ok\s*-->") {
$lineNumber++
continue
}

if ($line -match "\bpip3?\s+install\b" -and $line -notmatch "\buv\s+pip3?\s+install\b") {
if ($strippedLine -notmatch "^(name:|- name:)") {
$script:Violations += "$FilePath`:$lineNumber`: $strippedLine"
}
}
$lineNumber++
}
}
catch {
Write-Warning "Could not read $FilePath`: $_"
}
}

function script:Invoke-Lint {
param([string]$TargetDir = ".")

$script:Violations = @()
$script:ScannedFiles = @{}

if ($TargetDir -eq ".") {
foreach ($dir in @(".github/workflows", "scripts")) {
if (Test-Path $dir) {
Get-ChildItem -Path $dir -Recurse -File -ErrorAction SilentlyContinue | ForEach-Object { script:Scan-File -FilePath $_.FullName }
}
}
Get-ChildItem -Path "." -Recurse -Include *.py, *.ps1, *.yml, *.yaml, *.md -File -ErrorAction SilentlyContinue | ForEach-Object {
script:Scan-File -FilePath $_.FullName
}
} else {
Get-ChildItem -Path $TargetDir -Recurse -Include *.py, *.ps1, *.yml, *.yaml, *.md -File -ErrorAction SilentlyContinue | ForEach-Object {
script:Scan-File -FilePath $_.FullName
}
}

if ($script:Violations.Count -gt 0) {
Write-Error "ERROR: Found bare 'pip install' calls. Use 'uv pip install' instead."
Write-Host "The repo follows a uv-first Python convention.`n" -ForegroundColor Yellow
foreach ($v in ($script:Violations | Sort-Object -Unique)) {
Write-Host " - $v" -ForegroundColor Red
}
return $false
} else {
Write-Host "Success: No bare 'pip install' calls found." -ForegroundColor Green
return $true
}
}

if ($MyInvocation.InvocationName -ne '.') {
$success = script:Invoke-Lint -TargetDir $TestDirectory
if (-not $success) { exit 1 }
}
78 changes: 78 additions & 0 deletions scripts/tests/linting/Invoke-PipInstallLint.Tests.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# Copyright (c) 2026 Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT

Describe "Invoke-PipInstallLint.ps1" {
Comment on lines +1 to +4

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: Add the standard Pester module requirement and Unit tag so this suite follows the repository's discovery and filtering conventions.

Suggested change
# Copyright (c) 2026 Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
Describe "Invoke-PipInstallLint.ps1" {
#Requires -Modules Pester
# Copyright (c) 2026 Microsoft Corporation. All rights reserved.
# SPDX-License-Identifier: MIT
Describe "Invoke-PipInstallLint.ps1" -Tag "Unit" {

BeforeAll {
$scriptPath = "$PSScriptRoot/../../linting/Invoke-PipInstallLint.ps1"
. $scriptPath
$testDir = "$PSScriptRoot/TestLintDir"
if (Test-Path $testDir) { Remove-Item -Recurse -Force $testDir }
New-Item -ItemType Directory -Path $testDir | Out-Null
}

AfterAll {
if (Test-Path $testDir) { Remove-Item -Recurse -Force $testDir }
}

AfterEach {
if (Test-Path $testDir) { Remove-Item -Recurse -Force $testDir }
New-Item -ItemType Directory -Path $testDir | Out-Null
Comment on lines +8 to +19

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: These fixtures are created inside the repository checkout, so parallel or interrupted test runs can collide or leave workspace state. Please use Pester's $TestDrive for test-owned files.

Suggested change
$testDir = "$PSScriptRoot/TestLintDir"
if (Test-Path $testDir) { Remove-Item -Recurse -Force $testDir }
New-Item -ItemType Directory -Path $testDir | Out-Null
}
AfterAll {
if (Test-Path $testDir) { Remove-Item -Recurse -Force $testDir }
}
AfterEach {
if (Test-Path $testDir) { Remove-Item -Recurse -Force $testDir }
New-Item -ItemType Directory -Path $testDir | Out-Null
$testDir = Join-Path $TestDrive "TestLintDir"
New-Item -ItemType Directory -Path $testDir | Out-Null
}
AfterEach {
if (Test-Path $testDir) { Remove-Item -Recurse -Force $testDir }
New-Item -ItemType Directory -Path $testDir | Out-Null

}

It "Should pass on clean state" {
$testFile = Join-Path $testDir "clean.py"
Set-Content -Path $testFile -Value "print('hello world')"

$result = script:Invoke-Lint -TargetDir $testDir
$result | Should -Be $true
$script:Violations.Count | Should -Be 0
}

It "Should detect bare pip install violation" {
$testFile = Join-Path $testDir "violation.yml"
Set-Content -Path $testFile -Value "run: pip install malicious-package"

$result = script:Invoke-Lint -TargetDir $testDir
$result | Should -Be $false
$script:Violations.Count | Should -BeGreaterThan 0
$script:Violations[0] | Should -Match "malicious-package"
}

It "Should respect exclusion logic (evals directory)" {
$evalsDir = Join-Path $testDir "evals"
New-Item -ItemType Directory -Path $evalsDir | Out-Null
$testFile = Join-Path $evalsDir "fake_eval_test.py"
Set-Content -Path $testFile -Value "run: pip install mock-package"

$result = script:Invoke-Lint -TargetDir $testDir
$result | Should -Be $true
$script:Violations.Count | Should -Be 0
}

It "Should allow uv pip install" {
$testFile = Join-Path $testDir "uv_allowed.py"
Set-Content -Path $testFile -Value "run: uv pip install fastapi"

$result = script:Invoke-Lint -TargetDir $testDir
$result | Should -Be $true
$script:Violations.Count | Should -Be 0
}

It "Should respect inline ignore marker for Python/YAML" {
$testFile = Join-Path $testDir "ignored.py"
Set-Content -Path $testFile -Value "run: pip install legacy-package # pip-install-ok"

$result = script:Invoke-Lint -TargetDir $testDir
$result | Should -Be $true
$script:Violations.Count | Should -Be 0
}

It "Should respect inline ignore marker for Markdown" {
$testFile = Join-Path $testDir "ignored.md"
Set-Content -Path $testFile -Value "run: pip install legacy-package <!-- pip-install-ok -->"

$result = script:Invoke-Lint -TargetDir $testDir
$result | Should -Be $true
$script:Violations.Count | Should -Be 0
}
}
Loading