forked from tinymce/tinymce-react
-
Notifications
You must be signed in to change notification settings - Fork 0
fixed-remote-url #1
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
Open
Shubhamservaapty
wants to merge
2
commits into
main
Choose a base branch
from
bugfix/LSP-24097/fixed-remote-url
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| name: CI | ||
| on: | ||
| push: | ||
| branches: | ||
| - development | ||
| - qa | ||
| - staging | ||
| - production | ||
| - labs | ||
| pull_request: | ||
| branches: | ||
| - "*" | ||
|
|
||
| jobs: | ||
| rules: | ||
| name: Rules | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| branch_name: ${{ steps.validations.outputs.branch_name }} | ||
| should_deploy: ${{ steps.validations.outputs.should_deploy}} | ||
| steps: | ||
| - name: Fetch Branch Name | ||
| uses: aptyInc/gha-branch-name@master | ||
| id: validations | ||
|
|
||
| lint: | ||
| name: LINT_TEST | ||
| needs: [rules] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Caching node modules | ||
| id: modules-cache | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: "node_modules" | ||
| key: node-modules-${{ hashFiles('package.json') }} | ||
|
|
||
| - name: Install node modules | ||
| if: steps.modules-cache.outputs.cache-hit != 'true' | ||
| run: npm install | ||
|
|
||
| deploy: | ||
| needs: [rules, lint] | ||
| name: Deploy | ||
| runs-on: ubuntu-latest | ||
| if: ${{ needs.rules.outputs.should_deploy == 'true' }} | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - uses: actions/setup-node@v1 | ||
|
|
||
| - uses: webfactory/ssh-agent@v0.4.1 | ||
| with: | ||
| ssh-private-key: ${{ secrets.SSH_KEY }} | ||
|
|
||
| - name: Caching node modules | ||
| id: modules-cache | ||
| uses: actions/cache@v2 | ||
| with: | ||
| path: "node_modules" | ||
| key: node-modules-${{ hashFiles('package.json') }} | ||
|
|
||
| - name: Install node modules | ||
| if: steps.modules-cache.outputs.cache-hit != 'true' | ||
| run: npm install | ||
|
|
||
| - name: Building code | ||
| run: npm run build && cp package.json build/package.json | ||
|
|
||
| - name: Commit code for tinymce-react | ||
| run: | | ||
| cp package.json ./build | ||
| cd build | ||
| git init | ||
| git config user.email "admin@apty.io" | ||
| git config user.name "git-ci" | ||
| git add . | ||
| git commit -m "${{needs.rules.outputs.branch_name}}-${{github.event.head_commit.message}}" -a | ||
| git remote add origin "git@github.com:aptyInc/tinymce-react.git" | ||
| git checkout -b "${{needs.rules.outputs.branch_name}}-${{ github.sha }}" | ||
| git push origin "${{needs.rules.outputs.branch_name}}-${{ github.sha }}" | ||
| notifications: | ||
| name: Notification | ||
| runs-on: ubuntu-latest | ||
| needs: [rules, deploy] | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Getting user profile url | ||
| id: user_profile | ||
| uses: saiumesh535/gh-avatar-url@main | ||
| with: | ||
| username: ${{github.actor}} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check failure
Code scanning / CodeQL
Expression injection in Actions Critical
Copilot Autofix
AI about 1 year ago
To fix the problem, we need to avoid using user-controlled input directly in the
runcommand. Instead, we should set the untrusted input value to an intermediate environment variable and then use the environment variable using the native shell syntax. This will prevent any potential code injection.Specifically, we will:
branch_nameandcommit_messageto environment variables.runcommand using shell syntax.