Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:

jobs:
docker-build-publish:
permissions:
contents: read
name: Build and Publish Docker Image
runs-on: ubuntu-latest

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
fetch-depth: 0

- name: Install Dependencies
run: npm install --workspaces
run: npm ci --workspaces

- name: Code Linting
run: |
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ permissions:
jobs:
pr_title:
permissions:
contents: write
pull-requests: write
statuses: write
pull-requests: read
name: Validate & Label PR
runs-on: ubuntu-latest
steps:
Expand All @@ -45,6 +43,17 @@ jobs:
revert
test
break
release-drafter:
permissions:
contents: write
pull-requests: read
name: Release Drafter
runs-on: ubuntu-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@fa2e9d605c4eeb9fcad4c99c224cee0c6c7f3594 # v2.16.0
with:
egress-policy: audit
- uses: release-drafter/release-drafter@139054aeaa9adc52ab36ddf67437541f039b88e2 # v7
with:
commitish: main
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/sample-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ jobs:
working-directory: plugins/git-proxy-plugin-samples
run: npm run build

- name: Install peers and publish
- name: Publish git-proxy-plugin-samples
working-directory: plugins/git-proxy-plugin-samples
run: |
npm install --include=peer
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bit had to be removed in order to fix the "unpinned dependency" alert https://github.com/finos/git-proxy/security/code-scanning/113. I think this shouldn't cause issues since the published package wouldn't include the peer dep (finos/git-proxy) - unless I'm missing something 🤔

Pinging @coopernetes just in case!

npm publish --provenance --access=public
run: npm publish --provenance --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5 changes: 5 additions & 0 deletions src/proxy/processors/push-action/parsePush.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ async function exec(req: Request, action: Action): Promise<Action> {
if (!req.body || req.body.length === 0) {
throw new Error('No body found in request');
}

if (Array.isArray(req.body) || !Buffer.isBuffer(req.body)) {
throw new Error('Invalid body type');
}

const [packetLines, packDataOffset] = parsePacketLines(req.body);
const refUpdates = packetLines.filter((line) => line.includes(BRANCH_PREFIX));

Expand Down
Loading