Skip to content
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

XS✔ ◾ Updating CodeQL configuration #498

Merged
merged 5 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 9 additions & 0 deletions .github/azure-devops/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ stages:
- task: PRMetrics@1
displayName: PR Metrics
env:
# Fine-grained Personal Access Token (PAT) with the following permissions for microsoft/PR-Metrics:
# - Read access to Metadata
# - Read and Write access to Pull Requests
PR_METRICS_ACCESS_TOKEN: $(GITHUB_PAT)
inputs:
file-matching-patterns: |
Expand Down Expand Up @@ -119,6 +122,9 @@ stages:
- task: PRMetrics@1
displayName: PR Metrics
env:
# Fine-grained Personal Access Token (PAT) with the following permissions for microsoft/PR-Metrics:
# - Read access to Metadata
# - Read and Write access to Pull Requests
PR_METRICS_ACCESS_TOKEN: $(GITHUB_PAT)
inputs:
file-matching-patterns: |
Expand Down Expand Up @@ -147,6 +153,9 @@ stages:
- task: PRMetrics@1
displayName: PR Metrics
env:
# Fine-grained Personal Access Token (PAT) with the following permissions for microsoft/PR-Metrics:
# - Read access to Metadata
# - Read and Write access to Pull Requests
PR_METRICS_ACCESS_TOKEN: $(GITHUB_PAT)
inputs:
file-matching-patterns: |
Expand Down
12 changes: 3 additions & 9 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
## Summary

### Motivation

<!-- Provide a summary of the reasons or motivations behind this PR and what it
aims to accomplish. -->

### Technical

<!-- Provide a brief technical summary, if appropriate, describing the
change. -->
<!-- Provide a summary of the reasons or motivations behind this PR, what it
aims to accomplish, and technical implementation details. Consider using
Copilot. -->

## Testing

Expand Down
18 changes: 0 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,24 +270,6 @@ jobs:
print-valid-files: true
strict: false

validate-codeql:
name: Validate – CodeQL
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Initialize
uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
with:
config-file: .github/linters/codeql.yml
queries: security-extended,security-and-quality

- name: Analyze
uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3

validate-linter:
name: Validate – Linter
runs-on: ubuntu-latest
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

---

name: CodeQL

on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: 0 0 * * 1
workflow_dispatch: null

permissions: {}

jobs:
analyze:
name: Analyze JavaScript & TypeScript
runs-on: ubuntu-latest
timeout-minutes: 360
permissions:
security-events: write
steps:
- name: Checkout
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Initialize
uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
with:
languages: javascript-typescript
build-mode: none
config-file: .github/linters/codeql.yml
queries: security-extended,security-and-quality

- name: Analyze
uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
with:
category: /language:javascript-typescript

...
5 changes: 3 additions & 2 deletions .github/workflows/release-phase-1-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ jobs:
--assignee "${{ github.actor }}"
--reviewer "${{ github.actor }}"
env:
# Classic Personal Access Token (PAT) with the "repo" permission for microsoft. Fine-grained PATs will
# not work due to GitHub CLI's dependence on GraphQL.
# Fine-grained Personal Access Token (PAT) with the following permissions for microsoft/PR-Metrics:
# - Read access to Metadata
# - Read and Write access to Pull Requests
GITHUB_TOKEN: ${{ secrets.RELEASE_PHASE_1_PR_CREATE }}

- name: PR – Comment
Expand Down
Loading