mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-17 13:32:18 +00:00
Merge remote-tracking branch 'origin/main' into pr/2856
# Conflicts: # manifests/context-packs/skill-triggers@1.json
This commit is contained in:
commit
34c20e751b
266 files changed
+17164
-805
No files matched your search
@@ -79,10 +79,30 @@ jobs:
|
||||
- name: Install and verify ripgrep (Windows)
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
if (-not (Get-Command rg -ErrorAction SilentlyContinue)) {
|
||||
choco install ripgrep --yes --no-progress
|
||||
if ($LASTEXITCODE -ne 0) { throw 'ripgrep installation failed' }
|
||||
$ErrorActionPreference = 'Stop'
|
||||
if (-not (Get-Command rg -CommandType Application -ErrorAction SilentlyContinue)) {
|
||||
if ($env:RUNNER_ARCH -ne 'X64') { throw 'Pinned ripgrep archive requires an X64 runner' }
|
||||
$ripgrepVersion = '15.2.0'
|
||||
# Official BurntSushi/ripgrep release archive and published SHA256.
|
||||
$archiveName = "ripgrep-$ripgrepVersion-x86_64-pc-windows-msvc.zip"
|
||||
$expectedHash = '71b2fef860abe467217a538ff31de02f5258807c0129f771846f87bd029aafc5'
|
||||
$downloadRoot = Join-Path $env:RUNNER_TEMP ("ecc-ripgrep-" + [Guid]::NewGuid().ToString('N'))
|
||||
New-Item -ItemType Directory -Path $downloadRoot | Out-Null
|
||||
$archivePath = Join-Path $downloadRoot $archiveName
|
||||
$archiveUrl = "https://github.com/BurntSushi/ripgrep/releases/download/$ripgrepVersion/$archiveName"
|
||||
Invoke-WebRequest -Uri $archiveUrl -OutFile $archivePath -MaximumRetryCount 2 -RetryIntervalSec 2 -ConnectionTimeoutSeconds 15 -OperationTimeoutSeconds 60 -MaximumRedirection 5
|
||||
$actualHash = (Get-FileHash -LiteralPath $archivePath -Algorithm SHA256).Hash.ToLowerInvariant()
|
||||
if ($actualHash -ne $expectedHash) { throw 'ripgrep archive SHA256 verification failed' }
|
||||
Expand-Archive -LiteralPath $archivePath -DestinationPath $downloadRoot
|
||||
$ripgrepDir = Join-Path $downloadRoot "ripgrep-$ripgrepVersion-x86_64-pc-windows-msvc"
|
||||
$ripgrepExe = Join-Path $ripgrepDir 'rg.exe'
|
||||
if (-not (Test-Path -LiteralPath $ripgrepExe -PathType Leaf)) { throw 'Verified archive has no rg.exe' }
|
||||
& $ripgrepExe --version
|
||||
if ($LASTEXITCODE -ne 0) { throw 'Verified ripgrep executable failed' }
|
||||
Add-Content -LiteralPath $env:GITHUB_PATH -Value $ripgrepDir -Encoding utf8
|
||||
$env:PATH = "$ripgrepDir;$env:PATH"
|
||||
}
|
||||
rg --version
|
||||
if ($LASTEXITCODE -ne 0) { throw 'ripgrep executable is unavailable' }
|
||||
@@ -138,6 +158,13 @@ jobs:
|
||||
*) echo "Unsupported package manager: ${{ matrix.pm }}" && exit 1 ;;
|
||||
esac
|
||||
|
||||
- name: Check observer and revision identity
|
||||
if: matrix.scope == 'full'
|
||||
shell: bash
|
||||
run: |
|
||||
node tests/lib/observer-sessions.test.js
|
||||
node tests/commands/issue-review.test.js
|
||||
|
||||
# Run tests. Full lanes run every file through a 4-process pool on Linux
|
||||
# and macOS; Windows stays serial because its process spawn and temp-dir
|
||||
# cleanup are the flaky part. pm lanes derive their file list from the
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
name: npmscan
|
||||
|
||||
# Warn-only dependency check. When package.json, package-lock.json or yarn.lock
|
||||
# changes, it sends those files (base and PR versions) to npmscan.com and reports
|
||||
# what the PR changes: known malware or vulnerabilities in changed packages, new
|
||||
# install scripts, swapped tarballs or checksums, and override changes. No
|
||||
# environment variables or GitHub token are intentionally included. Values
|
||||
# embedded in dependency files are included, such as registry URLs and scripts.
|
||||
# Non-regular checkout inputs are refused before transmission. The check is
|
||||
# warning-only and comments on findings; the full report is in the job summary.
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- package.json
|
||||
- package-lock.json
|
||||
- yarn.lock
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: npmscan-${{ github.event.pull_request.number }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
scan:
|
||||
name: npmscan dependency check
|
||||
runs-on: ubuntu-latest
|
||||
# The action gives up on a hung API after about 5 minutes per scanned file.
|
||||
timeout-minutes: 20
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write # only for the one report comment; fork PRs get a read-only token and use the job summary
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Check dependency input boundaries
|
||||
id: input-safety
|
||||
shell: bash
|
||||
run: |
|
||||
safe=true
|
||||
for dependency_file in package.json package-lock.json yarn.lock; do
|
||||
if [ -L "$dependency_file" ] || { [ -e "$dependency_file" ] && [ ! -f "$dependency_file" ]; }; then
|
||||
safe=false
|
||||
echo "::warning::Skipping external dependency scan: $dependency_file is not a regular checkout file."
|
||||
fi
|
||||
done
|
||||
echo "safe=$safe" >> "$GITHUB_OUTPUT"
|
||||
- if: steps.input-safety.outputs.safe == 'true'
|
||||
uses: NPMscan/npmscan-action@83cb7d67204f8f2d1f76454ee9abf19c480dec26 # v1.4.0
|
||||
with:
|
||||
files: |
|
||||
package.json
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
mode: warn
|
||||
fail-on-error: false
|
||||
comment: on-findings
|
||||
Reference in new issue
Block a user