-
Notifications
You must be signed in to change notification settings - Fork 98
Develop #222
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
base: 1.2.0.1
Are you sure you want to change the base?
Develop #222
Conversation
MOSIP-21071 : Updated loc_holiday.xlsx
Updated blacklisted_words.xlsx
[MOSIP-21520] updated the mosip-data
[MOSIP-21520] update mosip-data for hindi,kannada, and tamil language
[ MOSIP-21520 ] Set is_active to 'TRUE'
[MOSIP-21520] updated mosip-data for hindi,kannada, and tamil language
[MOSIP-21577] updated mosip-data for hindi,kannada, and tamil language
[ MOSIP-21589 ] updated applicant_valid_document.xlsx
Signed-off-by: GOKULRAJ136 <110164849+GOKULRAJ136@users.noreply.github.com>
Signed-off-by: sudeep <sudeep.j7353@gmail.com>
Signed-off-by: Sudeep7353 <sudeep.j7353@gmail.com>
MOSIP-41249 ,MOSIP -41250,MOSIP-41222 : Email template changes
* MOSIP-40766: removed pms-revamp templates Signed-off-by: Swetha K <swetha.k@technoforte.co.in> * Added converted CSV files Signed-off-by: SwethaKrish4 <swetha.k@technoforte.co.in> --------- Signed-off-by: Swetha K <swetha.k@technoforte.co.in> Signed-off-by: SwethaKrish4 <swetha.k@technoforte.co.in> Co-authored-by: Swetha K <swetha.k@technoforte.co.in>
Signed-off-by: Swetha K <swetha.k@technoforte.co.in>
Signed-off-by: SwethaKrish4 <swetha.k@technoforte.co.in>
MOSIP-40766: Added all new pms-revamp templates
Signed-off-by: Swetha K <swetha.k@technoforte.co.in>
Signed-off-by: SwethaKrish4 <swetha.k@technoforte.co.in>
MOSIP-42622: Added new FTM, APIKEY, SBI and Weekly summary templates
Blocklisted word changes [MOSIP-28207]
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
Signed-off-by: chetankh239 <chetankumar.h.239@gmail.com>
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
Signed-off-by: chetankh239 <chetankumar.h.239@gmail.com>
Signed-off-by: Chetan Kumar Hirematha <chetankumar.h.239@gmail.com>
Signed-off-by: chetankh239 <chetankumar.h.239@gmail.com>
[MOSIP-42990] : Updated identity_schema with CRVS attributes
…issue fix in develop branch Signed-off-by: Ashok Kumar Sharma <ashok@mosip.io>
Signed-off-by: ashok-ksharma <ashok@mosip.io>
[MOSIP-43633] Added packetCreatedOn to identity schema for biometric issue fix in develop branch
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. 🗂️ Base branches to auto review (1)
Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com>
Create NOTICE
| steps: | ||
| - name: Clone the repository | ||
| run: | | ||
| #git clone -b ${{ github.event.pull_request.head.ref }} "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" |
Check failure
Code scanning / CodeQL
Code injection Critical
${ github.event.pull_request.head.ref }
pull_request_target
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 17 days ago
In general, the fix is to avoid using ${{ github.event.pull_request.head.ref }} directly in run: commands. Instead, assign it to an environment variable via the env: block and then reference it using the shell’s native syntax (e.g., $HEAD_REF) within the script. This prevents the GitHub expression engine from injecting untrusted content directly into the shell command line and confines any untrusted characters to a single argument position.
Concretely, we should:
- For the
git clonecommand, movegithub.event.pull_request.head.refinto an env var (e.g.,HEAD_REF) and then usegit clone -b "$HEAD_REF" ...in the script. Even though that line is commented out, we should fix the pattern so it is safe if re-enabled. - For the
git pushcommand, likewise pass both the head ref and the repo full name viaenv:asHEAD_REFandHEAD_REPO_FULL_NAME, and then use them as$HEAD_REFand$HEAD_REPO_FULL_NAMEinside the shell script. This eliminates${{ github.event.* }}from therun:body.
We will modify:
- The “Clone the repository” step to add an
env:section withHEAD_REFandHEAD_REPO_FULL_NAME, and update both the commented and activegit clonecommands to use$HEAD_REFand$HEAD_REPO_FULL_NAME. - The “Commit and push changes” step to add an
env:block withHEAD_REFandHEAD_REPO_FULL_NAME, and update thegit pushline to use standard shell variable syntax.
No new imports or external packages are needed; we only change the YAML workflow configuration.
-
Copy modified lines R19-R21 -
Copy modified lines R23-R24 -
Copy modified lines R56-R58 -
Copy modified line R64
| @@ -16,9 +16,12 @@ | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone the repository | ||
| env: | ||
| HEAD_REF: ${{ github.event.pull_request.head.ref }} | ||
| HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} | ||
| run: | | ||
| #git clone -b ${{ github.event.pull_request.head.ref }} "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" | ||
| git clone -b ${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git | ||
| #git clone -b "$HEAD_REF" "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$HEAD_REPO_FULL_NAME.git" | ||
| git clone -b "$HEAD_REF" "https://github.com/$HEAD_REPO_FULL_NAME.git" | ||
|
|
||
| - name: Get author email | ||
| run: | | ||
| @@ -51,9 +53,12 @@ | ||
| done | ||
|
|
||
| - name: Commit and push changes | ||
| env: | ||
| HEAD_REF: ${{ github.event.pull_request.head.ref }} | ||
| HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} | ||
| run: | | ||
| cd mosip-data | ||
| git branch | ||
| git add . | ||
| git commit -s -m "Added converted CSV files" || echo "No changes to commit" | ||
| git push "https://x-access-token:${{ secrets.ACTION_PAT }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" HEAD:${{ github.event.pull_request.head.ref }} | ||
| git push "https://x-access-token:${{ secrets.ACTION_PAT }}@github.com/$HEAD_REPO_FULL_NAME.git" "HEAD:$HEAD_REF" |
| - name: Clone the repository | ||
| run: | | ||
| #git clone -b ${{ github.event.pull_request.head.ref }} "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" | ||
| git clone -b ${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git |
Check failure
Code scanning / CodeQL
Code injection Critical
${ github.event.pull_request.head.ref }
pull_request_target
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 17 days ago
In general, to fix code injection issues in GitHub Actions, you should avoid using untrusted expressions directly in run: or script contexts. Instead, assign the expression to an environment variable via env: and then reference it using the shell’s native syntax ($VAR) inside the script, making sure it is properly quoted.
For this workflow, the best targeted fix is to move ${{ github.event.pull_request.head.ref }} into an environment variable (for example, PR_HEAD_REF) and use $PR_HEAD_REF in the git clone command. This keeps behavior identical—Git still clones the same branch from the same repository—but the untrusted value is no longer interpolated into the script as GitHub expression syntax at evaluation time. We will update only the “Clone the repository” step in .github/workflows/xlsx-to-csv.yml, adding an env: section and switching the git clone line to use $PR_HEAD_REF. No additional imports or external dependencies are needed.
-
Copy modified lines R19-R20 -
Copy modified lines R22-R23
| @@ -16,9 +16,11 @@ | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone the repository | ||
| env: | ||
| PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} | ||
| run: | | ||
| #git clone -b ${{ github.event.pull_request.head.ref }} "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" | ||
| git clone -b ${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git | ||
| #git clone -b "$PR_HEAD_REF" "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" | ||
| git clone -b "$PR_HEAD_REF" https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git | ||
|
|
||
| - name: Get author email | ||
| run: | |
| git branch | ||
| git add . | ||
| git commit -s -m "Added converted CSV files" || echo "No changes to commit" | ||
| git push "https://x-access-token:${{ secrets.ACTION_PAT }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" HEAD:${{ github.event.pull_request.head.ref }} |
Check failure
Code scanning / CodeQL
Code injection Critical
${ github.event.pull_request.head.ref }
pull_request_target
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 17 days ago
Generally, to fix this class of problems in GitHub Actions, untrusted expressions like ${{ github.event.pull_request.head.ref }} should not be interpolated directly into the shell in run: blocks. Instead, assign them to environment variables using workflow expression syntax and then reference them using the shell’s own variable expansion ($VAR). This prevents the workflow expression engine from injecting raw user-controlled strings directly into the shell script.
In this specific case, we should (1) move github.event.pull_request.head.ref and github.event.pull_request.head.repo.full_name into environment variables for the “Commit and push changes” step, and (2) use those variables as $PR_HEAD_REF and $PR_HEAD_REPO_FULL_NAME inside the shell script. This keeps the existing functionality (push back to the pull request’s head branch in the fork) but avoids direct expression interpolation inside the git push command. No other behavior changes are needed, and no extra libraries are required; the only change is within the YAML for that step.
Concretely:
- Edit the “Commit and push changes” step at lines 53–59.
- Add an
env:section under the step that setsPR_HEAD_REFandPR_HEAD_REPO_FULL_NAMEfrom the existing expressions. - Update the
git pushline to use$PR_HEAD_REPO_FULL_NAMEand$PR_HEAD_REFinstead of${{ github.event.pull_request.head.repo.full_name }}and${{ github.event.pull_request.head.ref }}.
-
Copy modified lines R54-R56 -
Copy modified line R62
| @@ -51,9 +51,12 @@ | ||
| done | ||
|
|
||
| - name: Commit and push changes | ||
| env: | ||
| PR_HEAD_REF: ${{ github.event.pull_request.head.ref }} | ||
| PR_HEAD_REPO_FULL_NAME: ${{ github.event.pull_request.head.repo.full_name }} | ||
| run: | | ||
| cd mosip-data | ||
| git branch | ||
| git add . | ||
| git commit -s -m "Added converted CSV files" || echo "No changes to commit" | ||
| git push "https://x-access-token:${{ secrets.ACTION_PAT }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" HEAD:${{ github.event.pull_request.head.ref }} | ||
| git push "https://x-access-token:${{ secrets.ACTION_PAT }}@github.com/$PR_HEAD_REPO_FULL_NAME.git" HEAD:$PR_HEAD_REF |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v2 | ||
| - name: Create Docker Network | ||
| run: docker network create mosip_network | ||
| - name: Setup PostgreSQL Container | ||
| run: | | ||
| docker run -d \ | ||
| --name postgresql \ | ||
| --network mosip_network \ | ||
| -p 5432:5432 \ | ||
| -e POSTGRES_USER=postgres \ | ||
| -e POSTGRES_PASSWORD=${{ env.SU_USER_PWD }} \ | ||
| -e POSTGRES_HOST_AUTH_METHOD=trust \ | ||
| postgres:16 | ||
| - name: Initialise mosip_master DB | ||
| run: | | ||
| docker run -itd \ | ||
| --name mosip_master_container \ | ||
| --network mosip_network \ | ||
| -e MOSIP_DB_NAME=mosip_master \ | ||
| -e DB_SERVERIP=postgresql \ | ||
| -e DB_PORT=5432 \ | ||
| -e SU_USER=postgres \ | ||
| -e DML_FLAG=1 \ | ||
| -e GIT_REPO_URL=https://github.com/mosip/admin-services.git \ | ||
| -e GIT_BRANCH=develop \ | ||
| -e SU_USER_PWD=${{ env.SU_USER_PWD }} \ | ||
| -e DBUSER_PWD=${{ env.DBUSER_PWD }} \ | ||
| mosipdev/postgres-init:develop | ||
|
|
||
| - name: docker ps command | ||
| run: docker ps -a | ||
| - name: Print Logs of mosip_master | ||
| run: | | ||
| # Display mosip_master_container logs | ||
| docker logs -f mosip_master_container | ||
|
|
||
| - name: Check whether db_init has errors in Logs | ||
| run: | | ||
| if docker logs mosip_master_container | grep -qi "error"; then | ||
| echo "Error found in mosip_master_container logs." | ||
| exit 1 | ||
| else | ||
| echo "No errors found in mosip_master_container logs." | ||
| fi | ||
|
|
||
|
|
||
| - name: Set environment variables | ||
| run: | | ||
| if [ "${{ github.event_name }}" = "pull_request" ]; then | ||
| REPO_URL="${{ github.event.pull_request.head.repo.clone_url }}" | ||
| BRANCH_NAME="${{ github.event.pull_request.head.ref }}" | ||
| else | ||
| REPO_URL="https://github.com/${{ github.repository }}.git" | ||
| BRANCH_NAME="${{ github.ref_name }}" | ||
| fi | ||
| echo "REPO_URL=${REPO_URL}" >> $GITHUB_ENV | ||
| echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV | ||
|
|
||
| - name: Run masterdata-loader | ||
| run: | | ||
| docker run -itd \ | ||
| --name masterdata_loader \ | ||
| --network mosip_network \ | ||
| -e DB_HOST=postgresql \ | ||
| -e DB_USER=masteruser \ | ||
| -e DB_PORT=5432 \ | ||
| -e DB_PWD=${{ env.DBUSER_PWD }} \ | ||
| -e REPOSITORY=${{ env.REPO_URL }}\ | ||
| -e BRANCH=${{ env.BRANCH_NAME }} \ | ||
| mosipdev/masterdata-loader:develop | ||
|
|
||
| - name: docker ps command | ||
| run: docker ps -a | ||
| - name: Print Logs of masterdata_loader | ||
| run: | | ||
| # Display masterdata_loader logs | ||
| docker logs -f masterdata_loader | ||
|
|
||
| - name: Check whether masterdata_loader has errors in Logs | ||
| run: | | ||
| if docker logs masterdata_loader | grep -qi "error"; then | ||
| echo "Error found in masterdata_loader logs." | ||
| exit 1 | ||
| else | ||
| echo "No errors found in masterdata_loader logs." | ||
| fi |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 17 days ago
In general, the fix is to explicitly declare minimal GITHUB_TOKEN permissions for this workflow or specific job(s) using a permissions: block, instead of relying on repository defaults. For a workflow that just checks out code and runs Docker/database commands, contents: read is sufficient for the entire workflow.
The single best fix here is to add a top-level permissions: block (so it applies to all jobs) with contents: read. This does not change existing functionality, because actions/checkout@v2 only requires read access to repository contents, and no steps modify GitHub resources. Concretely, in .github/workflows/push-trigger.yml, insert:
permissions:
contents: readbetween the on: block and the existing env: block (around current line 18). No imports, methods, or additional definitions are required, since this is purely a workflow configuration change.
-
Copy modified lines R18-R19
| @@ -15,6 +15,8 @@ | ||
| - develop | ||
| - 1.2.0.1 | ||
| - MOSIP* | ||
| permissions: | ||
| contents: read | ||
| env: | ||
| DBUSER_PWD: mosip123 | ||
| SU_USER_PWD: abc123 |
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone the repository | ||
| run: | | ||
| #git clone -b ${{ github.event.pull_request.head.ref }} "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" | ||
| git clone -b ${{ github.event.pull_request.head.ref }} https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git | ||
|
|
||
| - name: Get author email | ||
| run: | | ||
| PR_NUMBER=${{ github.event.number }} | ||
| commits=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | ||
| -H "Accept: application/vnd.github.v3+json" \ | ||
| "https://api.github.com/repos/${{ github.repository }}/pulls/$PR_NUMBER/commits") | ||
| email=$(echo "$commits" | jq -r '.[0].commit.author.email // "${{ github.event.pull_request.user.login }}@users.noreply.github.com"') | ||
| echo "author_email=$email" >> $GITHUB_ENV | ||
|
|
||
| - name: Set up Git identity | ||
| run: | | ||
| git config --global user.name "${{ github.event.pull_request.user.login }}" | ||
| git config --global user.email "${{ env.author_email }}" | ||
|
|
||
| - name: Install xlsx2csv | ||
| run: sudo apt-get install -y xlsx2csv | ||
|
|
||
| - name: Create output directory | ||
| run: | | ||
| rm -rf mosip-data/mosip_master_csv/csv | ||
| mkdir -p mosip-data/mosip_master_csv/csv | ||
|
|
||
| - name: Convert all XLSX to CSV | ||
| run: | | ||
| for xlsx_file in mosip-data/mosip_master/xlsx/*.xlsx; do | ||
| csv_file="mosip-data/mosip_master_csv/csv/$(basename "${xlsx_file%.xlsx}.csv")" | ||
| xlsx2csv "$xlsx_file" > "$csv_file" | ||
| echo "Converted $xlsx_file to $csv_file" | ||
| done | ||
|
|
||
| - name: Commit and push changes | ||
| run: | | ||
| cd mosip-data | ||
| git branch | ||
| git add . | ||
| git commit -s -m "Added converted CSV files" || echo "No changes to commit" | ||
| git push "https://x-access-token:${{ secrets.ACTION_PAT }}@github.com/${{ github.event.pull_request.head.repo.full_name }}.git" HEAD:${{ github.event.pull_request.head.ref }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 17 days ago
In general, fix this by explicitly declaring a permissions: block for the workflow or for the specific job, granting only the scopes required. This overrides repository defaults and constrains the GITHUB_TOKEN used within the job.
For this workflow, the steps only need to read repository contents and call GitHub’s REST API to read PR commits and metadata. All write operations to the repository use secrets.ACTION_PAT, not GITHUB_TOKEN. Therefore, we can set permissions: contents: read at the workflow or job level. Because the warning is on the job line (runs-on: ubuntu-latest), the clearest fix with minimal behavioral change is to add a permissions: block under the convert_xlsx_to_csv job, before runs-on.
Concretely:
- Edit
.github/workflows/xlsx-to-csv.yml. - Under
jobs: convert_xlsx_to_csv:, insert:
permissions:
contents: read- Keep indentation consistent (two spaces per level).
No new imports, methods, or additional configuration are required.
-
Copy modified lines R16-R17
| @@ -13,6 +13,8 @@ | ||
|
|
||
| jobs: | ||
| convert_xlsx_to_csv: | ||
| permissions: | ||
| contents: read | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Clone the repository |
Signed-off-by: rajapandi1234 <138785181+rajapandi1234@users.noreply.github.com>
license folder
No description provided.