Skip to content
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
3 changes: 3 additions & 0 deletions .github/workflows/check-license-headers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
branches: [main]
workflow_dispatch:

permissions:
contents: read

jobs:
check-license:
runs-on: ubuntu-latest
Expand Down
100 changes: 100 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

name: "CodeQL Advanced"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '18 16 * * 4'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: actions
build-mode: none
- language: csharp
build-mode: none
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'rust', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v5

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config: |
paths-ignore:
- 'dotnet/FunctionalTests/**'
- 'dotnet/UnitTests/**'
- 'nodejs/tests/**'
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# - name: Run manual build steps
# if: matrix.build-mode == 'manual'
# shell: bash
# run: |
# echo 'If you are using a "manual" build mode for one or more of the' \
# 'languages you are analyzing, replace this with the commands to build' \
# 'your code, for example:'
# echo ' make bootstrap'
# echo ' make release'
# exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:${{matrix.language}}"
3 changes: 3 additions & 0 deletions .github/workflows/test-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ on:
- ".github/workflows/test-dotnet.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: windows-latest
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/test-nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

name: Run NodeJS Tests
name: Run Node.js Tests

on:
pull_request:
Expand All @@ -12,6 +12,9 @@ on:
- ".github/workflows/test-nodejs.yml"
workflow_dispatch:

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -44,3 +47,7 @@ jobs:
- name: Run functional tests
working-directory: nodejs
run: npm run test:functional

- name: Run pre-publish tests
working-directory: nodejs
run: npm run build && npm pack && npm run test:prepublish
11 changes: 5 additions & 6 deletions .github/workflows/update-domains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,17 @@ name: Verify Azure Service Domains

on:
pull_request:
branches:
- main
paths:
- 'config/Domains.json'
- 'nodejs/src/Helpers/Domains.ts'
- 'dotnet/src/Helpers/Domains.cs'
push:
branches: [main]
paths:
- 'config/Domains.json'
- 'nodejs/src/Helpers/Domains.ts'
- 'dotnet/src/Helpers/Domains.cs'
workflow_dispatch: # Allow manual triggering

permissions:
contents: read

jobs:
verify-domains:
runs-on: ubuntu-latest
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/update-ip-ranges.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- 'dotnet/src/IPAddressRanges.cs'
workflow_dispatch: # Allow manual triggering

permissions:
contents: read

jobs:
verify-ranges:
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -420,4 +420,6 @@ FodyWeavers.xsd
*.msm
*.msp

.DS_Store
.DS_Store
*.tgz
temp-lib/
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,38 +35,38 @@ AntiSSRF helps mitigate these risks by:

### C# (.NET Framework and .NET Core)

- 📦 **NuGet Package**: [Microsoft.Security.AntiSSRF](https://www.nuget.org/packages/Microsoft.Security.AntiSSRF/)
- 📖 **Documentation**: [AntiSSRF .NET API Documentation](https://microsoft.github.io/AntiSSRF/dotnet-api/)
- 🚀 **Quick Start**: [Getting Started Guide](https://microsoft.github.io/AntiSSRF/getting-started)
- 📋 **Library README**: [.NET README](dotnet/README.md)
- **NuGet Package**: [Microsoft.Security.AntiSSRF](https://www.nuget.org/packages/Microsoft.Security.AntiSSRF/)
- **Documentation**: [AntiSSRF .NET API Documentation](https://microsoft.github.io/AntiSSRF/dotnet-api/)
- **Quick Start**: [Getting Started Guide](https://microsoft.github.io/AntiSSRF/getting-started)
- **Library README**: [.NET README](dotnet/README.md)

### JavaScript/TypeScript (Node.js)

- 📦 **npm Package**: [@microsoft/antissrf](https://www.npmjs.com/package/@microsoft/antissrf)
- 📖 **Documentation**: [AntiSSRF Node.js API Documentation](https://microsoft.github.io/AntiSSRF/nodejs-api/)
- 🚀 **Quick Start**: [Getting Started Guide](https://microsoft.github.io/AntiSSRF/getting-started)
- 📋 **Library README**: [Node.js README](nodejs/README.md)
- **npm Package**: [@microsoft/antissrf](https://www.npmjs.com/package/@microsoft/antissrf)
- **Documentation**: [AntiSSRF Node.js API Documentation](https://microsoft.github.io/AntiSSRF/nodejs-api/)
- **Quick Start**: [Getting Started Guide](https://microsoft.github.io/AntiSSRF/getting-started)
- **Library README**: [Node.js README](nodejs/README.md)

## Contributing

We welcome contributions! Please see our contribution resources:

- 🤝 **Contributing Guide**: [CONTRIBUTING.md](CONTRIBUTING.md)
- 🐛 **Report Issues**: [GitHub Issues](https://github.com/Microsoft/AntiSSRF/issues)
- **License**: [LICENSE](LICENSE)
- 🔒 **Security Policy**: [SECURITY.md](SECURITY.md)
- 📋 **Code of Conduct**: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
- 🆘 **Support**: [SUPPORT.md](SUPPORT.md)
- **Contributing Guide**: [CONTRIBUTING.md](CONTRIBUTING.md)
- **Report Issues**: [GitHub Issues](https://github.com/Microsoft/AntiSSRF/issues)
- **License**: [LICENSE](LICENSE)
- **Security Policy**: [SECURITY.md](SECURITY.md)
- **Code of Conduct**: [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)
- **Support**: [SUPPORT.md](SUPPORT.md)

## More Resources

### Learning About SSRF

- 📖 **AntiSSRF Documentation**: [Microsoft AntiSSRF Documentation](https://microsoft.github.io/AntiSSRF/)
- **AntiSSRF Documentation**: [Microsoft AntiSSRF Documentation](https://microsoft.github.io/AntiSSRF/)
- **OWASP SSRF Guide**: [Server-Side Request Forgery Prevention Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/Server_Side_Request_Forgery_Prevention_Cheat_Sheet.html)
- **PortSwigger Web Security Academy**: [Server-side request forgery (SSRF)](https://portswigger.net/web-security/ssrf)
- **CWE-918**: [Server-Side Request Forgery (SSRF)](https://cwe.mitre.org/data/definitions/918.html)

### Testing Tools

- 🧪 **Dusseldorf**: [Dynamic SSRF Testing Tool](https://github.com/Microsoft/Dusseldorf) - Microsoft's open-source tool for dynamic SSRF testing and validation
- **Dusseldorf**: [Dynamic SSRF Testing Tool](https://github.com/Microsoft/Dusseldorf) - Microsoft's open-source tool for dynamic SSRF testing and validation
Loading
Loading