Skip to content

Commit 8d16a74

Browse files
authored
Merge pull request #923 from rsksmart/master
master -> v2.4.1
2 parents 6ff7a57 + a9bea18 commit 8d16a74

File tree

5 files changed

+90
-33
lines changed

5 files changed

+90
-33
lines changed

.github/copilot-instructions.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
When performing a code review, apply the checks in the prompts/review-code.prompt.md file.
2+
3+
When performing a code review, focus on readability and avoid nested ternary operators.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
agent: 'agent'
3+
description: 'Perform a comprehensive code review'
4+
---
5+
6+
## Role
7+
8+
You're a senior software engineer conducting a thorough code review. Provide constructive, actionable feedback.
9+
10+
## Review Areas
11+
12+
Analyze the selected code for:
13+
14+
1. **Security Issues**
15+
- Input validation and sanitization
16+
- Data exposure risks
17+
- Injection vulnerabilities
18+
- OWASP Top 10 risks
19+
20+
2. **Performance & Efficiency**
21+
- Algorithm complexity
22+
- Memory usage patterns
23+
- Database query optimization
24+
- Unnecessary computations
25+
26+
3. **Code Quality**
27+
- Readability and maintainability
28+
- Proper naming conventions
29+
- Function/class size and responsibility
30+
- Code duplication
31+
32+
4. **Architecture & Design**
33+
- Design pattern usage
34+
- Separation of concerns
35+
- Dependency management
36+
- Error handling strategy
37+
38+
5. **Testing & Documentation**
39+
- Test coverage and quality
40+
- Documentation completeness
41+
- Comment clarity and necessity
42+
43+
## Output Format
44+
45+
Provide feedback as:
46+
47+
**🔴 Critical Issues** - Must fix before merge
48+
**🟡 Suggestions** - Improvements to consider
49+
**✅ Good Practices** - What's done well
50+
51+
For each issue:
52+
- Specific line references
53+
- Clear explanation of the problem
54+
- Suggested solution with code example
55+
- Rationale for the change
56+
57+
Focus on: ${input:focus:Any specific areas to emphasize in the review?}
58+
59+
Be constructive and educational in your feedback.

.github/workflows/devPortal-update.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,29 @@ jobs:
1616
- name: Checkout Code
1717
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1818

19-
# Step 1: Clone the Devportal Repository
19+
# Step 1: Generate GitHub App Token
20+
- name: Generate GitHub App Token
21+
id: generate_token
22+
uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1.10.3
23+
with:
24+
app-id: ${{ secrets.GH_APP_ID }}
25+
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
26+
owner: rsksmart
27+
repositories: devportal
28+
29+
# Step 2: Clone the Devportal Repository
2030
- name: Clone Devportal Repository
21-
env:
22-
GITHUB_TOKEN: ${{ secrets.DEVPORTAL_DOCS_UPDATE_TOKEN }}
2331
run: |
2432
TIMESTAMP=$(date +'%Y%m%d-%H%M%S')
2533
BRANCH_NAME="update-from-lps-${TIMESTAMP}"
2634
echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
2735
28-
git clone https://github.com/rsksmart/devportal.git
36+
git clone https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/rsksmart/devportal.git
2937
cd devportal
3038
git checkout -b ${BRANCH_NAME} || git checkout ${BRANCH_NAME}
3139
cd ..
3240
33-
# Step 2: Transform Each File and Copy to Devportal Repository
41+
# Step 3: Transform Each File and Copy to Devportal Repository
3442
- name: Transform Files for Devportal
3543
run: |
3644
set -e
@@ -232,27 +240,23 @@ jobs:
232240
rm ${TEMP_FILE}
233241
cp ${TRANSFORMED_FILE} ${BASE_DST}/trusted-accounts.md
234242
235-
# Step 3: Commit and Push Changes to Devportal Repository
243+
# Step 4: Commit and Push Changes to Devportal Repository
236244
- name: Commit and Push Changes
237-
env:
238-
GITHUB_TOKEN: ${{ secrets.DEVPORTAL_DOCS_UPDATE_TOKEN }}
239245
run: |
240246
cd devportal
241247
git config user.name "github-actions[bot]"
242248
git config user.email "github-actions[bot]@users.noreply.github.com"
243249
git add docs/02-developers/06-integrate/02-flyover/
244250
git commit -m "Automated update from Liquidity Provider Server repository"
245-
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/rsksmart/devportal.git
251+
git remote set-url origin https://x-access-token:${{ steps.generate_token.outputs.token }}@github.com/rsksmart/devportal.git
246252
git push -f origin ${BRANCH_NAME}
247253
248-
# Step 4: Create a Pull Request in the Devportal Repository
254+
# Step 5: Create a Pull Request in the Devportal Repository
249255
- name: Create Pull Request
250-
env:
251-
GITHUB_TOKEN: ${{ secrets.DEVPORTAL_DOCS_UPDATE_TOKEN }}
252256
run: |
253257
cd devportal
254258
curl -L -X POST -H "Accept: application/vnd.github+json" \
255-
-H "Authorization: Bearer ${{ secrets.DEVPORTAL_DOCS_UPDATE_TOKEN }}" \
259+
-H "Authorization: Bearer ${{ steps.generate_token.outputs.token }}" \
256260
-H "X-GitHub-Api-Version: 2022-11-28" \
257261
https://api.github.com/repos/rsksmart/devportal/pulls \
258262
-d "{\"title\":\"Liquidity-provider-server automated update of documentation ${BRANCH_NAME}\",\"body\":\"This PR updates the Devportal documentation with the latest changes from the Liquidity Provider Server repository.\",\"head\":\"${BRANCH_NAME}\",\"base\":\"main\"}"

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ The service is configured in `docker-compose/monitoring/src/config.ts` and suppo
195195

196196
The service can be configured to monitor other addresses by modifying the `MONITORED_ADDRESSES` array in `docker-compose/monitoring/src/config.ts`.
197197

198+
## Additional clarifications
199+
- The liquidity provider server is designed to run with an exclusive wallet. Horizontal scaling requires a separate wallet per instance. This codebase assumes a non-shared wallet.
200+
198201
## More Information
199202

200203
If you're looking forward to integrate with Flyover Protocol then you can check the [Flyover SDK repository](https://github.com/rsksmart/flyover-sdk/blob/main/README.md).

SECURITY.md

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,25 @@
1-
# Liquidity Provider Server Security Process
1+
# RootstockLabs's Security Process
22

33
We are committed to conduct our security process in a professional and civil manner. Public shaming, under-reporting or misrepresentation of vulnerabilities will not be tolerated.
44

55
## Responsible Disclosure
66

7-
For all security related issues, Liquidity Provider Server has two main points of contact. Reach us at `security@rootstocklabs.com` or refer to our [Bug Bounty Program](https://www.rootstocklabs.com/bug-bounty-program). **Do not open up a GitHub issue if the bug is a security vulnerability**
7+
For all security related issues, RootstockLabs has two main points of contact. Reach us at <security@rootstocklabs.com> or refer to our [Bug Bounty Program](https://www.rootstocklabs.com/bug-bounty-program/). **Do not open up a GitHub issue if the bug is a security vulnerability**
88

99
**Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/rsksmart/liquidity-provider-server/issues).
1010

11-
## Vulnerability Handling
11+
## Disclosure Policy
1212

13-
### Response Time
13+
- Follow Immunefi's [disclosure guidelines](https://immunefi.com/responsible-publication/).
14+
- Public disclosure of a vulnerability makes it ineligible for a bounty.
1415

15-
RootstockLabs will make a best effort to meet the following response times for reported vulnerabilities:
16-
17-
* Time to first response (from report submit) - 5 business days
18-
* Time to triage (from report submit) - 7 business days
19-
* Time to bounty (from triage) - 15 business days
20-
21-
We'll try to keep you informed about our progress throughout the process.
22-
23-
### Disclouse Policy
24-
25-
* Follow HackerOne's [disclosure guidelines](https://www.hackerone.com/disclosure-guidelines).
26-
* Public disclosure of a vulnerability makes it ineligible for a bounty. If the user reports the vulnerability to other security teams (e.g. Ethereum or ETC) but reports to RootstockLabs with considerable delay, then RootstockLabs may reduce or cancel the bounty.
27-
28-
For more information check RootstockLabs bounty program policy at [HackerOne](https://hackerone.com/rootstocklabs)
16+
For more information, check RootstockLabs bounty program policy at [Immunefi](https://immunefi.com/bug-bounty/rootstocklabs/information)
2917

3018
## Public Keys
3119

3220
### Security
3321

34-
```
22+
```gpg
3523
-----BEGIN PGP PUBLIC KEY BLOCK-----
3624
Version: GnuPG v2
3725
@@ -140,4 +128,4 @@ v0FjOkVKB3PSHj1q4fogldX0Yb55tUa3rX0Rb8QEKInQj8FFPd44XHclv9PTv0OL
140128
IfHtYt8huvu34FA85HR8wAOPiqvyJ7Oj
141129
=r7Yf
142130
-----END PGP PUBLIC KEY BLOCK-----
143-
```
131+
```

0 commit comments

Comments
 (0)