Repository navigation
Pushing Develop Code to Master Branch. (non release repo) #50
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
Changes from all commits
18acffe
7bb822e
f232b40
8dabb96
1aa1c78
07eb0c7
8ad0645
8130bd1
bcc87bb
2a4fd2b
288f32b
9c17fca
bab1c4a
717ddb0
27de7eb
006f175
6608b0c
3cbe423
f45988d
751af3d
36e4f64
c1a99c3
a04c0d9
fac2673
5e82dfc
09a30cd
220765c
c135419
de9f5b6
fae2537
bb5b75d
4f5737d
5e7a293
ddddfd7
e3c6b57
57cdf22
de7f1ce
5d92313
238b76e
d0f8a8f
9e26907
d4a17d1
46f9ff4
9bf0f9f
4c8d924
1673f21
9551bd5
3b2505f
2cf5366
e85a684
9ae776d
8a77524
e3363ad
c7e1374
3c03d0c
8225896
83f78a8
4fa3421
34e4334
4b37897
6942eea
b3fb0d8
465ae0c
41bd685
6ad2504
c238be9
cb8cf0f
0e82c30
08c7546
47497c0
775ccd8
991c470
6381233
79bf809
d303c93
976f971
4282e0f
dacf269
e33f9fb
d8973e0
d09b506
68abf74
526b640
3e9eeb1
b924a3d
6e55454
8461f5e
f6c28d0
5903356
4448d53
26e1d49
da574c4
f1ffd3c
92f8347
57d821d
02904e1
b532155
00fcc72
b765e94
c11e70e
22f7041
7a3157c
28adca4
111bbbb
cd44539
307aba5
56bf2af
9c1b40b
0d6049d
68cb197
c9916d7
cd5af64
b246026
28ecd39
e2c165d
1b4d93d
afcb768
9bf0eff
6df2c0d
06a3a2e
68ae63c
0e88b80
b54fda5
de11ce8
17d35f0
3788a50
d6d81a6
de426b8
6084c63
fc25dbc
6637977
bb11230
f91d4c2
d13e79e
93e8bb5
d89f95d
6e3bee9
18d8215
d573a26
8685b38
adae46b
90e16fe
12013a1
1d34318
eae51af
60dccc5
3deaa7f
0849b17
73c3fae
1cb1183
7504c84
b97b7b2
4b9bf07
1532ce1
398079f
0e8427c
8bf1b0a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: Validate / Publish helm charts | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| paths: | ||
| - 'helm/**' | ||
| workflow_dispatch: | ||
| inputs: | ||
| IGNORE_CHARTS: | ||
| description: 'Provide list of charts to be ignored separated by pipe(|)' | ||
| required: false | ||
| default: '""' | ||
| type: string | ||
| CHART_PUBLISH: | ||
| description: 'Chart publishing to gh-pages branch' | ||
| required: false | ||
| default: 'NO' | ||
| type: string | ||
| options: | ||
| - YES | ||
| - NO | ||
| INCLUDE_ALL_CHARTS: | ||
| description: 'Include all charts for Linting/Publishing (YES/NO)' | ||
| required: false | ||
| default: 'NO' | ||
| type: string | ||
| options: | ||
| - YES | ||
| - NO | ||
| push: | ||
| branches: | ||
| - '!release-branch' | ||
| - '!master' | ||
| - 1.* | ||
| - 0.* | ||
| - develop | ||
| - MOSIP* | ||
| - release* | ||
| paths: | ||
| - 'helm/**' | ||
|
|
||
| jobs: | ||
| chart-lint-publish: | ||
| uses: mosip/kattu/.github/workflows/chart-lint-publish.yml@master | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
for f in \
.github/workflows/chart-lint-publish.yml \
.github/workflows/push-trigger.yml \
.github/workflows/sonar-check.yml \
.github/workflows/use-pr-linker.yml
do
echo "===== $f ====="
cat -n "$f"
doneRepository: mosip/security-tools Length of output: 6379 Security Misconfiguration (CWE-494): Download of Code Without Integrity Check Reachability: External · Exploitability: Difficult Pin every GitHub Action and reusable workflow to a reviewed commit SHA. The listed references use mutable branches or tags. Pin them to full immutable commit SHAs and retain the release label in a comment. This prevents upstream changes from modifying workflow code that can access repository tokens or configured credentials. Affected references:
🧰 Tools🪛 zizmor (1.29.0)[warning] 1-63: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) [warning] 46-63: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) [error] 47-47: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy) (unpinned-uses) 📍 Affects 4 files
🤖 Prompt for AI AgentsSource: Linters/SAST tools Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action or reusable workflow Medium
Job
Job: chart-lint-publish Error loading related location Loading |
||
| with: | ||
| CHARTS_DIR: ./helm | ||
| CHARTS_URL: https://mosip.github.io/mosip-helm | ||
| REPOSITORY: mosip-helm | ||
| BRANCH: gh-pages | ||
| INCLUDE_ALL_CHARTS: "${{ inputs.INCLUDE_ALL_CHARTS || 'NO' }}" | ||
| IGNORE_CHARTS: "${{ inputs.IGNORE_CHARTS || '\"\"' }}" | ||
| CHART_PUBLISH: "${{ inputs.CHART_PUBLISH || 'YES' }}" | ||
| LINTING_CHART_SCHEMA_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/chart-schema.yaml" | ||
| LINTING_LINTCONF_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/lintconf.yaml" | ||
| LINTING_CHART_TESTING_CONFIG_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/chart-testing-config.yaml" | ||
| LINTING_HEALTH_CHECK_SCHEMA_YAML_URL: "https://raw.githubusercontent.com/mosip/kattu/master/.github/helm-lint-configs/health-check-schema.yaml" | ||
| secrets: | ||
| TOKEN: ${{ secrets.ACTION_PAT }} | ||
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| name: Building Security Tools | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
| pull_request: | ||
| types: [opened, reopened, synchronize] | ||
| workflow_dispatch: | ||
| inputs: | ||
| message: | ||
| description: 'Message for manually triggering' | ||
| required: false | ||
| default: 'Triggered for Updates' | ||
| type: string | ||
| push: | ||
| branches: | ||
| - master | ||
| - 1.* | ||
| - develop* | ||
| - release* | ||
| - MOSIP* | ||
| - update | ||
|
|
||
| jobs: | ||
| build-dockers: | ||
| strategy: | ||
| matrix: | ||
| include: | ||
| - SERVICE_LOCATION: 'databreachdetector' | ||
| SERVICE_NAME: 'databreachdetector' | ||
| - SERVICE_LOCATION: 'certmanager' | ||
| SERVICE_NAME: 'certmanager' | ||
| - SERVICE_LOCATION: 'auditsweeper' | ||
| SERVICE_NAME: 'auditsweeper' | ||
| ONLY_DOCKER: true | ||
| fail-fast: false | ||
| name: ${{ matrix.SERVICE_NAME }} | ||
| uses: mosip/kattu/.github/workflows/docker-build.yml@master | ||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action or reusable workflow Medium
Job
Job: build-dockers Error loading related location Loading |
||
| with: | ||
| SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }} | ||
| SERVICE_NAME: ${{ matrix.SERVICE_NAME }} | ||
| ONLY_DOCKER: ${{ matrix.ONLY_DOCKER }} | ||
| secrets: | ||
| DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }} | ||
| ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }} | ||
| RELEASE_DOCKER_HUB: ${{ secrets.RELEASE_DOCKER_HUB }} | ||
| SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DEVOPS }} | ||
| Original file line number | Diff line number | Diff line change | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,41 @@ | |||||||||||||||||||||||||||||
| name: SonarCloud PR Quality Gate | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| on: | |||||||||||||||||||||||||||||
| push: | |||||||||||||||||||||||||||||
| branches: | |||||||||||||||||||||||||||||
| - develop | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| jobs: | |||||||||||||||||||||||||||||
| sonar_analysis: | |||||||||||||||||||||||||||||
| name: maven-sonar-analysis | |||||||||||||||||||||||||||||
| runs-on: ubuntu-latest | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| steps: | |||||||||||||||||||||||||||||
| - name: Checkout code | |||||||||||||||||||||||||||||
| uses: actions/checkout@v4 | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Set up JDK 21 | |||||||||||||||||||||||||||||
| uses: actions/setup-java@v4 | |||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||
| java-version: 21 | |||||||||||||||||||||||||||||
| distribution: 'temurin' | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Cache SonarCloud packages | |||||||||||||||||||||||||||||
| uses: actions/cache@v4 | |||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||
| path: ~/.sonar/cache | |||||||||||||||||||||||||||||
| key: ${{ runner.os }}-sonar | |||||||||||||||||||||||||||||
| restore-keys: ${{ runner.os }}-sonar | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Cache Maven packages | |||||||||||||||||||||||||||||
| uses: actions/cache@v4 | |||||||||||||||||||||||||||||
| with: | |||||||||||||||||||||||||||||
| path: ~/.m2 | |||||||||||||||||||||||||||||
| key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |||||||||||||||||||||||||||||
| restore-keys: ${{ runner.os }}-m2 | |||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||
| - name: Run SonarCloud analysis | |||||||||||||||||||||||||||||
| env: | |||||||||||||||||||||||||||||
| SONAR_TOKEN: f4e496ee8ddc6661404844949201593f56078e94 | |||||||||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🔴 Critical | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: sed -n '1,80p' .github/workflows/sonar-check.ymlRepository: mosip/security-tools Length of output: 1238 🏁 Script executed: cat -n .github/workflows/sonar-check.yml | sed -n '1,80p'Repository: mosip/security-tools Length of output: 1525 Sensitive Data Exposure (CWE-798): Use of Hard-coded Credentials Reachability: Internal · Exploitability: Trivial Remove and rotate the exposed SonarCloud token. The workflow passes a committed literal to Proposed fix- SONAR_TOKEN: f4e496ee8ddc6661404844949201593f56078e94
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}📝 Committable suggestion
Suggested change
🧰 Tools🪛 Betterleaks (1.8.1)[high] 39-39: Uncovered a Sonar API token, potentially compromising software vulnerability scanning and code security. (sonar-api-token) 🪛 Checkov (3.3.11)[low] 39-40: Base64 High Entropy String (CKV_SECRET_6) 🪛 zizmor (1.29.0)[warning] 1-42: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) [warning] 9-42: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block (excessive-permissions) 🤖 Prompt for AI AgentsSources: Path instructions, Linters/SAST tools |
|||||||||||||||||||||||||||||
| run: | | |||||||||||||||||||||||||||||
| mvn -B verify sonar:sonar -Dsonar.projectKey=mosip_security-tools -Dsonar.organization=mosip -Dsonar.host.url=https://sonarcloud.io -DskipSigning=true | |||||||||||||||||||||||||||||
|
Comment on lines
+10
to
+41
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI about 1 year ago To fix the issue, add a Change summary:
Suggested changeset
1
.github/workflows/sonar-check.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Refresh and try again.
|
|||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| name: Auto link PR to Issues | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - edited | ||
| - synchronize | ||
| - reopened | ||
| - closed | ||
|
|
||
| permissions: | ||
| contents: read | ||
| issues: write | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| call-linker: | ||
| uses: mosip/kattu/.github/workflows/link-pr-to-issue.yml@develop | ||
Check warningCode scanning / CodeQL Unpinned tag for a non-immutable Action or reusable workflow Medium
Job
Job: call-linker Error loading related location Loading |
||
| secrets: | ||
| ACTION_PAT: ${{ secrets.ACTION_PAT }} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win
🔎 Supported by static analysis
🤖 get_repo_knowledge executed:
get_repo_knowledge mosip/security-tools /tmp/coderabbit-repo-knowledge/mosip-security-tools-6031b6ce/conventionsLength of output: 5583
🏁 Script executed:
Repository: mosip/security-tools
Length of output: 4643
🌐 Web query:
site:docs.github.com GitHub Actions workflow_dispatch inputs options choice type string💡 Result:
In GitHub Actions, you can use the choice input type within a workflow_dispatch event to provide a dropdown list of selectable options in the GitHub UI [1][2]. When configuring an input with type: choice, you must include an options property, which is a list of strings representing the selectable values [1][3]. The choice type resolves to a single string value [1][2]. Example configuration: on: workflow_dispatch: inputs: logLevel: description: 'Log level' required: true default: 'warning' type: choice options: - info - warning - debug You can access the selected value in your workflow using the ${{ inputs.logLevel }} context [1][2][4]. Note that while other input types like boolean are handled specifically within the inputs context, the choice type functions as a standard string [1][2]. Valid input types for workflow_dispatch include boolean, choice, number, environment, and string [2].
Citations:
Set
CHART_PUBLISHandINCLUDE_ALL_CHARTStochoice.Both inputs declare
optionswithtype: string, which violates the GitHub Actionsworkflow_dispatchcontract. GitHub may reject this workflow before chart validation runs. This can weaken MOSIP change-control enforcement.Proposed fix
Apply this change to both inputs.
🧰 Tools
🪛 actionlint (1.7.12)
[error] 17-17: "options" can not be set to "chart_publish" input because its input type is not "choice"
(events)
🪛 zizmor (1.29.0)
[warning] 1-63: overly broad permissions (excessive-permissions): default permissions used due to no permissions: block
(excessive-permissions)
🤖 Prompt for AI Agents
Source: Linters/SAST tools