diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 65d1501..be853c5 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,11 +1,9 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright 2022 Intel Corporation - # Timeline for each ecosystem is intentionally staggered to spread # Dependabot PRs over the week. version: 2 updates: - - package-ecosystem: "docker" directory: "/" schedule: @@ -13,7 +11,6 @@ updates: day: "sunday" time: "21:00" timezone: "America/Los_Angeles" - - package-ecosystem: "gomod" directory: "/" schedule: @@ -21,7 +18,6 @@ updates: day: "thursday" time: "21:00" timezone: "America/Los_Angeles" - - package-ecosystem: github-actions directory: / schedule: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 201e04b..eb7659d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,7 +1,6 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright 2024 Intel Corporation name: CI Pipeline - on: pull_request: branches: @@ -9,10 +8,8 @@ on: push: branches: - main - permissions: contents: read - jobs: build: permissions: @@ -24,7 +21,6 @@ jobs: uses: omec-project/.github/.github/workflows/build.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - docker-build: permissions: contents: read @@ -34,7 +30,6 @@ jobs: uses: omec-project/.github/.github/workflows/docker-build.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - static-analysis: permissions: contents: read @@ -45,7 +40,6 @@ jobs: uses: omec-project/.github/.github/workflows/static-analysis.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - lint: permissions: contents: read @@ -56,7 +50,6 @@ jobs: with: golangci_lint_version: 'v2.11.3' branch_name: ${{ github.ref }} - hadolint: permissions: contents: read @@ -66,7 +59,6 @@ jobs: uses: omec-project/.github/.github/workflows/hadolint.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - license-check: permissions: contents: read @@ -75,7 +67,6 @@ jobs: uses: omec-project/.github/.github/workflows/license-check.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - fossa-scan: permissions: contents: read @@ -85,7 +76,6 @@ jobs: uses: omec-project/.github/.github/workflows/fossa-scan.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - unit-tests: permissions: contents: read @@ -95,7 +85,6 @@ jobs: uses: omec-project/.github/.github/workflows/unit-test.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - analysis: if: github.repository_owner == 'omec-project' permissions: @@ -121,7 +110,6 @@ jobs: uses: omec-project/.github/.github/workflows/scorecard-analysis.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 with: branch_name: ${{ github.ref }} - e2e-tests: if: github.event_name == 'pull_request' permissions: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1f3e80e..2c5d1d6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -1,17 +1,14 @@ # SPDX-License-Identifier: Apache-2.0 # Copyright 2024 Intel Corporation name: Release Pipeline - on: push: branches: - main paths: - "VERSION" - permissions: contents: read - jobs: tag-github: permissions: @@ -20,7 +17,6 @@ jobs: id-token: write uses: omec-project/.github/.github/workflows/tag-github.yml@c6f69e74f8ee9034dcc237ccbd719de59526aee5 # v0.0.30 secrets: inherit - release-image: needs: tag-github permissions: @@ -34,7 +30,6 @@ jobs: changed: ${{ needs.tag-github.outputs.changed }} version: ${{ needs.tag-github.outputs.version }} secrets: inherit - update-version: needs: tag-github permissions: @@ -47,7 +42,6 @@ jobs: changed: ${{ needs.tag-github.outputs.changed }} version: ${{ needs.tag-github.outputs.version }} secrets: inherit - sbom-source: needs: tag-github permissions: @@ -60,7 +54,6 @@ jobs: artifact_name: ${{ github.event.repository.name }}-${{ needs.tag-github.outputs.version }}.spdx.json sbom_format: spdx-json path: . - grype-scan: needs: [tag-github, sbom-source] permissions: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 8a77c16..2da1560 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -3,12 +3,10 @@ on: schedule: - cron: "0 0 * * *" - permissions: issues: write pull-requests: write contents: read - jobs: stale: permissions: diff --git a/.golangci.yml b/.golangci.yml index 8947e0c..e539ed3 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,6 +1,5 @@ # SPDX-FileCopyrightText: 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 - version: "2" run: concurrency: 4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 37cbb5d..5ae4e3b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,46 +1,49 @@ # SPDX-FileCopyrightText: 2025 Intel Corporation # SPDX-License-Identifier: Apache-2.0 - repos: -- repo: https://github.com/gitleaks/gitleaks - rev: v8.30.1 - hooks: - - id: gitleaks -- repo: local - hooks: - - id: gci - name: gci - entry: gci write - language: golang - types: [go] - additional_dependencies: - - github.com/daixiang0/gci@v0.14.0 - - id: staticcheck - name: staticcheck - entry: staticcheck ./... - language: golang - types: [go] - additional_dependencies: - - honnef.co/go/tools/cmd/staticcheck@v0.7.0 - pass_filenames: false - - id: go-test-race - name: go test -race - entry: go test -race ./... -count=1 - language: system - types: [go] - pass_filenames: false -- repo: https://github.com/golangci/golangci-lint - rev: v2.11.3 - hooks: - - id: golangci-lint-full -- repo: https://github.com/pre-commit/pre-commit-hooks - rev: v6.0.0 - hooks: - - id: end-of-file-fixer - - id: trailing-whitespace - args: - - --markdown-linebreak-ext=md -- repo: https://codeberg.org/fsfe/reuse-tool - rev: v6.2.0 - hooks: - - id: reuse + - repo: https://github.com/gitleaks/gitleaks + rev: v8.30.1 + hooks: + - id: gitleaks + - repo: local + hooks: + - id: gci + name: gci + entry: gci write + language: golang + types: [go] + additional_dependencies: + - github.com/daixiang0/gci@v0.14.0 + - id: staticcheck + name: staticcheck + entry: staticcheck ./... + language: golang + types: [go] + additional_dependencies: + - honnef.co/go/tools/cmd/staticcheck@v0.7.0 + pass_filenames: false + - id: go-test-race + name: go test -race + entry: go test -race ./... -count=1 + language: system + types: [go] + pass_filenames: false + - repo: https://github.com/golangci/golangci-lint + rev: v2.11.3 + hooks: + - id: golangci-lint-full + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v6.0.0 + hooks: + - id: end-of-file-fixer + - id: trailing-whitespace + args: + - --markdown-linebreak-ext=md + - repo: https://github.com/google/yamlfmt + rev: v0.21.0 + hooks: + - id: yamlfmt + - repo: https://codeberg.org/fsfe/reuse-tool + rev: v6.2.0 + hooks: + - id: reuse diff --git a/config/simapp.yaml b/config/simapp.yaml index aa657af..64df3c7 100644 --- a/config/simapp.yaml +++ b/config/simapp.yaml @@ -2,7 +2,6 @@ # # SPDX-License-Identifier: Apache-2.0 # - info: description: SIMAPP initial local configuration version: 1.0.0 @@ -13,20 +12,20 @@ logger: configuration: max-workers: 50 subscribers: - - ueId-start: 123456789123458 - ueId-end: 123456789123458 - plmnId: 20893 - opc: 8e27b6af0e692e750f32667a3b14605d - op: "" - key: 8baf473f2f8fd09487cccbd7097c6862 - sequenceNumber: 16f3b3f70fc2 - - ueId-start: 123456789123460 - ueId-end: 123456789123465 - plmnId: 222222 - opc: 22222222222222222222222222222222 - op: "" - key: 22222222222222222222222222222222 - sequenceNumber: 222222222 + - ueId-start: 123456789123458 + ueId-end: 123456789123458 + plmnId: 20893 + opc: 8e27b6af0e692e750f32667a3b14605d + op: "" + key: 8baf473f2f8fd09487cccbd7097c6862 + sequenceNumber: 16f3b3f70fc2 + - ueId-start: 123456789123460 + ueId-end: 123456789123465 + plmnId: 222222 + opc: 22222222222222222222222222222222 + op: "" + key: 22222222222222222222222222222222 + sequenceNumber: 222222222 provision-network-slice: false sub-provision-endpt: #points to sdcore endpoint addr: webui #should be webui for 5G and config4g for 4G @@ -35,132 +34,132 @@ configuration: addr: subproxy.roc.xxx #should be set to ROC subscriber proxy port: 5000 device-groups: - - name: "iot-camera" - imsis: - - "123456789123456" - - "123456789123457" - msisdns: - - "msisdn-9000000001" - - "msisdn-9000000002" - ip-domain-name: "IP-Domains" - ip-domains: - - dnn: ims - dns-primary: 8.8.8.8 - pcscf-primary: 10.10.10.10 - dns-secondary: 8.8.4.4 - mtu: 1460 - ue-ip-pool: 10.92.0.0/16 - ue-dnn-qos: - dnn-mbr-downlink: 2400 - dnn-mbr-uplink: 1200 - bitrate-unit: kbps - traffic-class: #default bearer QCI/ARP - name: "platinum" - qci: 5 - arp: 1 - pdb: 100 - pelr: 6 - - dnn: internet - dns-primary: 8.8.8.8 - dns-secondary: 8.8.4.4 - mtu: 1460 - ue-ip-pool: 10.91.0.0/16 - ue-dnn-qos: - dnn-mbr-downlink: 20 - dnn-mbr-uplink: 4 + - name: "iot-camera" + imsis: + - "123456789123456" + - "123456789123457" + msisdns: + - "msisdn-9000000001" + - "msisdn-9000000002" + ip-domain-name: "IP-Domains" + ip-domains: + - dnn: ims + dns-primary: 8.8.8.8 + pcscf-primary: 10.10.10.10 + dns-secondary: 8.8.4.4 + mtu: 1460 + ue-ip-pool: 10.92.0.0/16 + ue-dnn-qos: + dnn-mbr-downlink: 2400 + dnn-mbr-uplink: 1200 + bitrate-unit: kbps + traffic-class: #default bearer QCI/ARP + name: "platinum" + qci: 5 + arp: 1 + pdb: 100 + pelr: 6 + - dnn: internet + dns-primary: 8.8.8.8 + dns-secondary: 8.8.4.4 + mtu: 1460 + ue-ip-pool: 10.91.0.0/16 + ue-dnn-qos: + dnn-mbr-downlink: 20 + dnn-mbr-uplink: 4 + bitrate-unit: Mbps + traffic-class: #default bearer QCI/ARP + name: "platinum" + qci: 9 + arp: 6 + pdb: 300 + pelr: 6 + site-info: "menlo" + network-slices: + - name: "slice1" + slice-id: + sd: 65565 + sst: 255 + site-device-group: + - "iot-camera" + application-filtering-rules: + - rule-name: rule1 + priority: 25 + action: "permit" + endpoint: 0.0.0.0/0 + app-mbr-uplink: 100 #100kbps + app-mbr-downlink: 2000 #2Mbps + bitrate-unit: Kbps + traffic-class: + name: "silver" #if same as APN-AMBR then its default bearer rule + - rule-name: rule2 + priority: 15 + action: "permit" + endpoint: 8.8.8.8/32 + app-mbr-uplink: 1 #1Mbps + app-mbr-downlink: 5 #5Mbps bitrate-unit: Mbps - traffic-class: #default bearer QCI/ARP + traffic-class: #if same as APN-AMBR then its default bearer rule + name: "silver" + qci: 9 + arp: 6 + pdb: 300 + pelr: 6 + - rule-name: rule3 + priority: 25 + action: "permit" + endpoint: 8.8.8.4/32 + app-mbr-uplink: 120 + app-mbr-downlink: 520 + bitrate-unit: Kbps + traffic-class: #this will create new bearer if QCI/ARP combination is different than default QCI/ARP name: "platinum" qci: 9 arp: 6 pdb: 300 pelr: 6 - site-info: "menlo" - network-slices: - - name: "slice1" - slice-id: - sd: 65565 - sst: 255 - site-device-group: - - "iot-camera" - application-filtering-rules: - - rule-name: rule1 - priority: 25 - action: "permit" - endpoint: 0.0.0.0/0 - app-mbr-uplink: 100 #100kbps - app-mbr-downlink: 2000 #2Mbps - bitrate-unit: Kbps - traffic-class: - name: "silver" #if same as APN-AMBR then its default bearer rule - - rule-name: rule2 - priority: 15 - action: "permit" - endpoint: 8.8.8.8/32 - app-mbr-uplink: 1 #1Mbps - app-mbr-downlink: 5 #5Mbps - bitrate-unit: Mbps - traffic-class: #if same as APN-AMBR then its default bearer rule - name: "silver" - qci: 9 - arp: 6 - pdb: 300 - pelr: 6 - - rule-name: rule3 - priority: 25 - action: "permit" - endpoint: 8.8.8.4/32 - app-mbr-uplink: 120 - app-mbr-downlink: 520 - bitrate-unit: Kbps - traffic-class: #this will create new bearer if QCI/ARP combination is different than default QCI/ARP - name: "platinum" - qci: 9 - arp: 6 - pdb: 300 - pelr: 6 - rule-trigger: api #dont create this bearer immediately. Wait for API call - - rule-name: rule4 - priority: 35 - action: "permit" - endpoint: 1.1.1.1/32 - app-mbr-uplink: 120000 - app-mbr-downlink: 520000 - bitrate-unit: bps - traffic-class: #this will create new bearer if QCI/ARP combination is different than default QCI/ARP - name: "gold" - qci: 9 - arp: 6 - pdb: 300 - pelr: 6 - rule-trigger: "timer,10" #dont create this bearer immediately. Create after 10 sec time. - - rule-name: rule5 - priority: 45 - action: "permit" - endpoint: 1.1.1.2/32 - app-mbr-uplink: 120000 - app-mbr-downlink: 520000 - bitrate-unit: bps - traffic-class: #this will create new bearer if QCI/ARP combination is different than default QCI/ARP - name: "diamond" - qci: 9 - arp: 6 - pdb: 300 - pelr: 6 - rule-trigger: "timer,0" #immeidate creation of this bearer immediately. Create after 10 sec time. - qos: - uplink: 2 #2Mbps - downlink: 5 #5Mbps - bitrate-unit: Mbps - traffic-class: "silver" #default bearer QCI/ARP - site-info: - gNodeBs: - - name: menlo-gnb1 - tac: 1 - plmn: - mcc: "315" - mnc: "010" - site-name: menlo - upf: - upf-name: upf.menlo.aetherproject.org - upf-port: 8805 + rule-trigger: api #dont create this bearer immediately. Wait for API call + - rule-name: rule4 + priority: 35 + action: "permit" + endpoint: 1.1.1.1/32 + app-mbr-uplink: 120000 + app-mbr-downlink: 520000 + bitrate-unit: bps + traffic-class: #this will create new bearer if QCI/ARP combination is different than default QCI/ARP + name: "gold" + qci: 9 + arp: 6 + pdb: 300 + pelr: 6 + rule-trigger: "timer,10" #dont create this bearer immediately. Create after 10 sec time. + - rule-name: rule5 + priority: 45 + action: "permit" + endpoint: 1.1.1.2/32 + app-mbr-uplink: 120000 + app-mbr-downlink: 520000 + bitrate-unit: bps + traffic-class: #this will create new bearer if QCI/ARP combination is different than default QCI/ARP + name: "diamond" + qci: 9 + arp: 6 + pdb: 300 + pelr: 6 + rule-trigger: "timer,0" #immeidate creation of this bearer immediately. Create after 10 sec time. + qos: + uplink: 2 #2Mbps + downlink: 5 #5Mbps + bitrate-unit: Mbps + traffic-class: "silver" #default bearer QCI/ARP + site-info: + gNodeBs: + - name: menlo-gnb1 + tac: 1 + plmn: + mcc: "315" + mnc: "010" + site-name: menlo + upf: + upf-name: upf.menlo.aetherproject.org + upf-port: 8805