microsoft/generative-ai-for-beginners

5 workflows · maturity 17% · 1 patterns · GitHub ↗

Security 25/100

Practices

○ Matrix✓ Permissions○ Security scan○ AI review○ Cache○ Concurrency○ Reusable workflows

Detected patterns

Security dimensions

permissions
25
security scan
0
supply chain
0
secret handling
0
harden runner
0

Workflows (5)

lock perms .github/workflows/lock.yml
Triggers
issues
Runs on
ubuntu-latest
Jobs
lock
Actions
OSDKDev/lock-issues
View raw YAML
name: Lock closed issue

on: 
  issues:
    types: [closed]

permissions:
  contents: read
  issues: write

jobs:
  lock:
    runs-on: ubuntu-latest
    steps:
    - uses: OSDKDev/lock-issues@v1.2
      with:
        repo-token: "${{ secrets.GITHUB_TOKEN }}"
stale perms .github/workflows/stale.yml
Triggers
schedule
Runs on
ubuntu-latest
Jobs
stale
Actions
actions/stale
View raw YAML
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
  schedule:
  - cron: '35 8 * * *'

permissions:
  issues: write
  pull-requests: write

jobs:
  stale:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/stale@v10
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        stale-issue-message: 'This issue has not seen any action for a while! Closing for now, but it can be reopened at a later date.'
        stale-pr-message: 'This PR has not seen any action for a while! Closing for now, but it can be reopened at a later date.'
        stale-issue-label: 'no-issue-activity'
        stale-pr-label: 'no-pr-activity'
        days-before-stale: 30 # Added parameter to control inactivity period
        days-before-close: 7  # Optional: Time after marking stale before closing
validate-markdown perms .github/workflows/validate-markdown.yml
Triggers
pull_request
Runs on
ubuntu-latest, ubuntu-latest, ubuntu-latest, ubuntu-latest, ubuntu-latest
Jobs
check-broken-paths, check-paths-tracking, check-urls-tracking, check-urls-locale, check-broken-urls
Actions
john0isaac/action-check-markdown, john0isaac/action-check-markdown, john0isaac/action-check-markdown, john0isaac/action-check-markdown, john0isaac/action-check-markdown
View raw YAML
name: Validate Markdown

on:
  # Trigger the workflow on pull request
  pull_request:
    branches: 
      - main
    paths:
      - '**.md'
      - '**.ipynb'
      - '!translations/**'
      - '!translated_images/**'

permissions:
  contents: read
  pull-requests: write

jobs:
  check-broken-paths:
    name: Check Broken Relative Paths
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v6
      - name: Check broken Paths
        id: check-broken-paths
        uses: john0isaac/action-check-markdown@v1.1.0
        with:
          command: check_broken_paths
          directory: ./
          guide-url: 'https://github.com/microsoft/generative-ai-for-beginners/blob/main/CONTRIBUTING.md'
          github-token: ${{ secrets.GITHUB_TOKEN }}
  check-paths-tracking:
    if: ${{ always() }}
    needs: check-broken-paths
    name: Check Paths Have Tracking
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v6
      - name: Run Check paths tracking
        id: check-paths-tracking
        uses: john0isaac/action-check-markdown@v1.1.0
        with:
          command: check_paths_tracking
          directory: ./
          guide-url: 'https://github.com/microsoft/generative-ai-for-beginners/blob/main/CONTRIBUTING.md'
          github-token: ${{ secrets.GITHUB_TOKEN }}
  check-urls-tracking:
    if: ${{ always() }}
    needs: check-paths-tracking
    name: Check URLs Have Tracking
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v6
      - name: Run Check URLs tracking
        id: check-urls-tracking
        uses: john0isaac/action-check-markdown@v1.1.0
        with:
          command: check_urls_tracking
          directory: ./
          guide-url: 'https://github.com/microsoft/generative-ai-for-beginners/blob/main/CONTRIBUTING.md'
          github-token: ${{ secrets.GITHUB_TOKEN }}
  check-urls-locale:
    if: ${{ always() }}
    needs: check-urls-tracking
    name: Check URLs Don't Have Locale
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v6
      - name: Run Check URLs Country Locale
        id: check-urls-locale
        uses: john0isaac/action-check-markdown@v1.1.0
        with:
          command: check_urls_locale
          directory: ./
          guide-url: 'https://github.com/microsoft/generative-ai-for-beginners/blob/main/CONTRIBUTING.md'
          github-token: ${{ secrets.GITHUB_TOKEN }}
  check-broken-urls:
    if: ${{ always() }}
    name: Check Broken URLs
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v6
      - name: Run Check Broken URLs
        id: check-broken-urls
        uses: john0isaac/action-check-markdown@v1.1.0
        with:
          command: check_broken_urls
          directory: ./
          guide-url: 'https://github.com/microsoft/generative-ai-for-beginners/blob/main/CONTRIBUTING.md'
          github-token: ${{ secrets.GITHUB_TOKEN }}

welcome-issue perms .github/workflows/welcome-issue.yml
Triggers
issues
Runs on
ubuntu-latest
Jobs
assess-issue
Actions
pozil/auto-assign-issue
View raw YAML
name: Welcome to the Microsoft Generative AI
on:
  # Trigger the workflow on new issue
  issues:
    types: [opened]
permissions:
  contents: read
  issues: write
jobs:
  assess-issue:
    runs-on: ubuntu-latest
    steps:
      - name: Add Label and thanks comment to Issue
        uses: actions/github-script@v8
        with:
          script: |
            const issueAuthor = context.payload.sender.login
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ['needs-review']
            })
            github.rest.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: `👋 Thanks for contributing @${ issueAuthor }! We will review the issue and get back to you soon.`
            })
      - name: Auto-assign issue
        uses: pozil/auto-assign-issue@v2
        with:
          repo-token:  ${{ secrets.GITHUB_TOKEN }}
          assignees: koreyspace
welcome-pr perms .github/workflows/welcome-pr.yml
Triggers
pull_request_target
Runs on
ubuntu-latest
Jobs
assess-pull-request
Actions
pozil/auto-assign-issue
View raw YAML
name: Welcome to the Microsoft Generative AI
on:
  # Trigger the workflow on pull request
  pull_request_target:
    types: [opened]
permissions:
  contents: read
  pull-requests: write
jobs:
  assess-pull-request:
    runs-on: ubuntu-latest
    steps:
      - name: Add Label and thanks comment to Pull request
        uses: actions/github-script@v8
        with:
          script: |
            const issueAuthor = context.payload.sender.login
            github.rest.issues.addLabels({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              labels: ['needs-review']
            })
            github.rest.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: `👋 Thanks for contributing @${ issueAuthor }! We will review the pull request and get back to you soon.`
            })
      - name: Auto-assign pull request
        uses: pozil/auto-assign-issue@v2
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          assignees: koreyspace