
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@positioner/psk-appsettings-update
Advanced tools
Automatically update the appsettings.json version with a random string or commit hash
Automatically update the
appsettings.json
version with a random string or commit hash
This package exposes the command update-appsettings
A typical CI workflow file should look like this:
jobs:
build-and-deploy:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Build Sass
run: |
npm install --no-audit
gulp sass
- npx update-appsettings
+ - name: Get latest assets version
+ run: |
+ $API_RESPONSE = $(curl -L -H "Authorization: Bearer ${{ github.token }}" https://api.github.com/repos/${{ github.repository }}/issues/1)
+ $ISSUE_TITLE = echo "$API_RESPONSE" | jq -r '.title'
+ echo "LATEST_ASSETS_VERSION=$ISSUE_TITLE" >> $env:GITHUB_ENV
+ - name: Check for JS/CSS/SCSS changes and update appsettings.json
+ id: appsettings
+ run: |
+ $changedFiles = git diff --name-only ${{ github.event.before }} ${{ github.event.after }} | Select-String -Pattern '\.js$|\.scss$|\.css$'
+ if ($changedFiles) {
+ echo "changedFiles=1" >> $env:GITHUB_OUTPUT
+ npx update-appsettings ${{ github.event.after }}
+ }
+ else {
+ $LATEST_ASSETS_VERSION = $env:LATEST_ASSETS_VERSION
+ if ($LATEST_ASSETS_VERSION -ne "null") {
+ npx update-appsettings $LATEST_ASSETS_VERSION
+ } else {
+ echo "createIssue=1" >> $env:GITHUB_OUTPUT
+ npx update-appsettings ${{ github.event.after }}
+ }
+ }
[...dotnet stuff...]
- name: Deploy to Azure WebApp
uses: azure/webapps-deploy@v2
with:
app-name: ${{ env.AZURE_WEBAPP_NAME }}
package: ${{ env.AZURE_WEBAPP_PACKAGE_PATH }}
publish-profile: ${{ env.AZURE_WEBAPP_PUBLISH_PROFILE }}
+ - name: Update latest assets version
+ id: updateIssue
+ if: steps.appsettings.outputs.changedFiles == '1'
+ continue-on-error: true
+ shell: bash
+ run: |
+ curl -fL -X PATCH -H "Authorization: Bearer ${{ github.token }}" https://api.github.com/repos/${{ github.repository }}/issues/1 -d '{"title":"${{ github.event.after }}"}'
+ - name: Create latest assets version issue if it doesn't exist
+ if: steps.appsettings.outputs.createIssue == '1' || (steps.appsettings.outputs.changedFiles == '1' && steps.updateIssue.outcome == 'failure')
+ shell: bash
+ run: |
+ curl -L -X POST -H "Authorization: Bearer ${{ github.token }}" https://api.github.com/repos/${{ github.repository }}/issues -d '{"title":"${{ github.event.after }}"}'
[...notify stuff...]
FAQs
Automatically update the appsettings.json version with a random string or commit hash
The npm package @positioner/psk-appsettings-update receives a total of 62 weekly downloads. As such, @positioner/psk-appsettings-update popularity was classified as not popular.
We found that @positioner/psk-appsettings-update demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.