Skip to content
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/assign-issues-to-projects.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
name: Add issue to Team Authorization project
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
- uses: actions/add-to-project@8b5d8dd2895c251002b427e4688a6115b5ed2f09 # main
with:
project-url: https://github.com/orgs/Altinn/projects/50
github-token: ${{ secrets.ASSIGN_PROJECT_TOKEN }}
10 changes: 5 additions & 5 deletions .github/workflows/build-and-analyze-fork.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: |
8.0.x
3.1.x
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

Expand All @@ -31,7 +31,7 @@ jobs:
reportgenerator -reports:TestResults/**/coverage.cobertura.xml -targetdir:TestResults/Output/CoverageReport -reporttypes:Cobertura

- name: Archive code coverage results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: code-coverage-report
path: TestResults/Output/CoverageReport/
Expand All @@ -43,12 +43,12 @@ jobs:
needs: test
steps:
- name: Download Coverage Results
uses: actions/download-artifact@master
uses: actions/download-artifact@2a5974104b6d5dbdb2f9468a3e54da3bdd241578 # master
with:
name: code-coverage-report
path: dist/
- name: Create Coverage Summary Report
uses: irongut/CodeCoverageSummary@v1.3.0
uses: irongut/CodeCoverageSummary@51cc3a756ddcd398d447c044c02cb6aa83fdae95 # v1.3.0
with:
filename: dist/Cobertura.xml
badge: true
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/build-and-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ jobs:
if: ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) || github.event_name == 'push') && github.repository_owner == 'Altinn' && github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Set inotify watchers
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Set inotify instances
run: echo fs.inotify.max_user_instances=8192 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: |
8.0.x
Expand All @@ -32,27 +32,27 @@ jobs:
runs-on: windows-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: |
8.0.x
- name: Set up JDK 11
uses: actions/setup-java@v4
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: 'microsoft'
java-version: 17
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,23 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup .NET 8.0.* SDK
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: |
8.0.x
3.1.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@d77b13a0df3134d64a457ea9003f600b09fa1c8a # v3
with:
languages: ${{ matrix.language }}
# 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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@d77b13a0df3134d64a457ea9003f600b09fa1c8a # v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@d77b13a0df3134d64a457ea9003f600b09fa1c8a # v3
4 changes: 2 additions & 2 deletions .github/workflows/container-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Build the Docker image
run: docker build . --tag altinn-authorization:${{github.sha}}

- uses: Azure/container-scan@v0.1
- uses: Azure/container-scan@f9af925b897d8af5f7e0026b8bca9346261abc93 # v0.1
with:
image-name: altinn-authorization:${{ github.sha }}
env:
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/create-pnd-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
issues: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: 9
run_install: |
Expand All @@ -31,7 +31,7 @@ jobs:

- id: create
name: Create issue
uses: JasonEtco/create-an-issue@v2
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand All @@ -58,13 +58,13 @@ jobs:
issues: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- uses: actions/setup-node@v4
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 20

- uses: pnpm/action-setup@v4
- uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4
with:
version: 9
run_install: |
Expand All @@ -74,7 +74,7 @@ jobs:

- id: create
name: Create issue
uses: JasonEtco/create-an-issue@v2
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5 # v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/infrastructure-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ jobs:
environment: ${{ inputs.environment }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Terraform Set TFVARS
run: echo "TF_VARS_FILE=$(echo ${{ inputs.environment }} | tr '[:upper:]' '[:lower:]').tfvars" >> $GITHUB_ENV

- name: Terraform Initialize
uses: altinn/altinn-platform/actions/terraform/plan@main
uses: altinn/altinn-platform/actions/terraform/plan@474e7b3f1fe151567890759eddb6bb67eb90a681 # main
with:
working_directory: ${{ env.WORKING_DIR }}
oidc_type: environment
Expand All @@ -53,10 +53,10 @@ jobs:
if: inputs.tf_should_apply
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Terraform Initialize
uses: altinn/altinn-platform/actions/terraform/plan@main
uses: altinn/altinn-platform/actions/terraform/plan@474e7b3f1fe151567890759eddb6bb67eb90a681 # main
with:
working_directory: ${{ env.WORKING_DIR }}
oidc_type: environment
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pep-dotnet-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ jobs:
DOTNET_HOSTBUILDER__RELOADCONFIGONCHANGE: false
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: |
6.0.x
5.0.x
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Build
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pep-test-and-analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,28 @@ jobs:
runs-on: windows-latest
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: |
6.0.x
5.0.x
- name: Set up JDK 11
uses: actions/setup-java@v4
uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4
with:
distribution: 'zulu'
java-version: 17
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Cache SonarCloud packages
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~\sonar\cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v4
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: .\.sonar\scanner
key: ${{ runner.os }}-sonar-scanner
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-abac-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
if: startsWith(github.ref, 'refs/tags/Altinn.Authorization.ABAC-')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: |
8.0.x
Expand All @@ -31,7 +31,7 @@ jobs:
dotnet pack --configuration Release --no-build

- name: Create artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: nuget package
path: src/Altinn.Authorization.ABAC/bin/Release/*.nupkg
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-pep-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
if: startsWith(github.ref, 'refs/tags/Altinn.Common.PEP-')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # v4
with:
dotnet-version: |
8.0.x
Expand All @@ -31,7 +31,7 @@ jobs:
dotnet pack --configuration Release --no-build

- name: Create artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: nuget package
path: src/Altinn.Common.PEP/Altinn.Common.PEP/bin/Release/*.nupkg
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine@sha256:23dc03ba28a2036ef15c35d0e958a560a43e8551e1ee5de404a93c24d3e330ea AS build

Check warning on line 1 in Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use either the version tag or the digest for the image instead of both.

See more on https://sonarcloud.io/project/issues?id=Altinn_altinn-authorization&issues=AZ4h6RuXrJDU8ONvsC-L&open=AZ4h6RuXrJDU8ONvsC-L&pullRequest=1305
WORKDIR Authorization/

COPY src/Authorization ./Authorization
Expand All @@ -7,7 +7,7 @@
RUN dotnet build Altinn.Platform.Authorization.csproj -c Release -o /app_output
RUN dotnet publish Altinn.Platform.Authorization.csproj -c Release -o /app_output

FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine@sha256:6c8c1cac5dfbdbb5848fdd3dedee1f3a7d23d013d0763c68ee9a3ed5c2367c8b AS final

Check warning on line 10 in Dockerfile

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Use either the version tag or the digest for the image instead of both.

See more on https://sonarcloud.io/project/issues?id=Altinn_altinn-authorization&issues=AZ4h6RuXrJDU8ONvsC-M&open=AZ4h6RuXrJDU8ONvsC-M&pullRequest=1305
EXPOSE 5050
WORKDIR /app
COPY --from=build /app_output .
Expand Down
Loading