chore(deps-dev): bump knip from 6.26.0 to 6.27.0 in /Packages/src/TypeScriptServer~ #2714
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Security Code Scan | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| paths: | |
| - 'Packages/src/**/*.cs' | |
| - 'Assets/**/*.cs' | |
| - 'Packages/src/TypeScriptServer~/**/*.ts' | |
| - 'Packages/src/TypeScriptServer~/package.json' | |
| - 'Packages/src/TypeScriptServer~/package-lock.json' | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - 'Packages/src/**/*.cs' | |
| - 'Assets/**/*.cs' | |
| - 'Packages/src/TypeScriptServer~/**/*.ts' | |
| - 'Packages/src/TypeScriptServer~/package.json' | |
| - 'Packages/src/TypeScriptServer~/package-lock.json' | |
| workflow_dispatch: | |
| jobs: | |
| security-scan: | |
| name: C# Security Analysis | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v5 | |
| with: | |
| dotnet-version: '6.0.x' | |
| - name: Run SecurityCodeScan on uLoopMCP Package | |
| run: | | |
| # Create a temporary project file for scanning | |
| cat > temp-uloopmcp.csproj << 'EOF' | |
| <Project Sdk="Microsoft.NET.Sdk"> | |
| <PropertyGroup> | |
| <TargetFramework>net6.0</TargetFramework> | |
| <Nullable>enable</Nullable> | |
| <TreatWarningsAsErrors>false</TreatWarningsAsErrors> | |
| </PropertyGroup> | |
| <ItemGroup> | |
| <Compile Include="Packages/src/**/*.cs" /> | |
| </ItemGroup> | |
| <ItemGroup> | |
| <PackageReference Include="SecurityCodeScan.VS2019" Version="5.6.7" PrivateAssets="all" /> | |
| </ItemGroup> | |
| </Project> | |
| EOF | |
| # Run dotnet build to trigger SecurityCodeScan analysis | |
| dotnet restore temp-uloopmcp.csproj | |
| # Build with continue on error and create a basic SARIF file if scanning fails | |
| if ! dotnet build temp-uloopmcp.csproj --configuration Release --verbosity normal --no-restore; then | |
| echo "SecurityCodeScan completed with warnings/errors - creating placeholder SARIF" | |
| cat > security-results.sarif << 'SARIF_EOF' | |
| { | |
| "version": "2.1.0", | |
| "$schema": "http://json.schemastore.org/sarif-2.1.0-rtm.5", | |
| "runs": [ | |
| { | |
| "tool": { | |
| "driver": { | |
| "name": "SecurityCodeScan", | |
| "informationUri": "https://security-code-scan.github.io/", | |
| "version": "5.6.7" | |
| } | |
| }, | |
| "results": [] | |
| } | |
| ] | |
| } | |
| SARIF_EOF | |
| else | |
| echo "SecurityCodeScan completed successfully" | |
| fi | |
| - name: Upload SARIF results to GitHub | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: always() && hashFiles('security-results.sarif') != '' | |
| with: | |
| sarif_file: security-results.sarif | |
| category: "SecurityCodeScan" | |
| - name: Upload security scan results as artifact | |
| uses: actions/upload-artifact@v7 | |
| if: always() | |
| with: | |
| name: security-scan-results | |
| path: security-results.sarif | |
| typescript-security: | |
| name: TypeScript Security Analysis | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: 'Packages/src/TypeScriptServer~/package-lock.json' | |
| - name: Install dependencies | |
| working-directory: Packages/src/TypeScriptServer~ | |
| run: npm ci --ignore-scripts=false | |
| - name: Run TypeScript security check | |
| working-directory: Packages/src/TypeScriptServer~ | |
| run: npm run security:check | |
| npm-supply-chain-security: | |
| name: NPM Supply Chain Security | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: '22' | |
| - name: Run npm audit | |
| working-directory: Packages/src/TypeScriptServer~ | |
| run: | | |
| echo "Running npm audit for security vulnerabilities..." | |
| npm audit --audit-level=moderate || { | |
| echo "::warning::npm audit found vulnerabilities. Review and update dependencies." | |
| exit 1 | |
| } | |
| - name: Install lockfile-lint | |
| run: npm install -g lockfile-lint | |
| - name: Run lockfile-lint | |
| working-directory: Packages/src/TypeScriptServer~ | |
| run: | | |
| echo "Validating package-lock.json integrity..." | |
| lockfile-lint \ | |
| --path package-lock.json \ | |
| --type npm \ | |
| --allowed-hosts npm \ | |
| --allowed-schemes "https:" "git+https:" |