Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot commented Jan 4, 2026

docs: audit triage - update SECURITY.md and add audit report

Summary

Processes the AuditAgent security audit report (Scan ID: 26, January 4, 2026) and updates documentation accordingly. This PR:

  1. Updates SECURITY.md to reflect audited status and removes the non-existent email contact
  2. Adds the full audit PDF report to audits/ directory
  3. Documents responses to all 15 audit findings in audit_responses.md
  4. Fixes TestBorrower vulnerability (Issue [Security][High][TestBorrower] Arbitrary lender injection allows draining USDC #19) - hardens the example contract against arbitrary lender injection

GitHub issues created for audit findings - all resolved:

  • #18: Excess USDC extraction (Medium) - Closed as design decision
  • #19: TestBorrower lender injection (High - example code) - Fixed in this PR
  • #20: Missing ERC20 return value checks (Info) - Closed as future version improvement
  • #21: Missing events (Best Practices) - Closed as gas optimization design decision

Updates since last revision

Review & Testing Checklist for Human

Test Plan

  1. Review the TestBorrower.sol diff to verify the security fix logic
  2. Optionally run forge test to ensure no regressions (note: fork tests may fail without RPC)
  3. Review audit_responses.md classifications against the audit PDF

Notes

  • The invariant wording changed from "must always equal" to "should equal" - intentional to reflect that direct transfers can cause temporary desync
  • TestBorrower is example/test code, not deployed production code, but was fixed to prevent copy-paste vulnerabilities
  • The audit PDF is ~4MB binary file

Link to Devin run: https://app.devin.ai/sessions/861106c4151b439ebcb344694d9b611a
Requested by: Player 53627 (github.stagnate430@passmail.com) / @igor53627

devin-ai-integration bot and others added 2 commits January 4, 2026 19:17
- Update audit status to reflect AuditAgent scan (Jan 4, 2026)
- Remove email contact, add GitHub Issues as reporting method
- Add link to GitHub private vulnerability reporting
- Document known risk of excess USDC extraction vulnerability
- Add audits/ directory with full audit report PDF

Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>
…sions

Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>
@devin-ai-integration
Copy link
Contributor Author

Original prompt from Player 53627
is there anything we can make better in the repo?


You only need to look in the following repo: igor53627/liq

@changeset-bot
Copy link

changeset-bot bot commented Jan 4, 2026

⚠️ No Changeset found

Latest commit: eb21019

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link

coderabbitai bot commented Jan 4, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

devin-ai-integration bot and others added 4 commits January 4, 2026 19:24
- Add expectedAmount tracking to prevent amount manipulation
- Validate initiator is this contract
- Validate token is USDC
- Validate callback amount matches requested amount

Fixes #19

Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>
Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>
…, TestBorrower as fixed

Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>
Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>
@igor53627 igor53627 merged commit e1ad2dd into main Jan 4, 2026
2 checks passed
@igor53627 igor53627 deleted the devin/1767554212-audit-triage-security-update branch January 4, 2026 19:54
devin-ai-integration bot added a commit that referenced this pull request Jan 4, 2026
- New TestBorrower: 0x7e13a21ce933a7122a8d1bdf0aeced4ba48ecad6
- Old TestBorrower (0x53cdd...) had arbitrary lender injection vulnerability
- Security fix from PR #22 now deployed on mainnet
- Deploy tx: 0x6fbf09875769de685b2118a130ff0b2c1986df29174bd8c2cb7e28062f420350

Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>
igor53627 added a commit that referenced this pull request Jan 4, 2026
* docs: update TestBorrower address after security fix redeployment

- New TestBorrower: 0x7e13a21ce933a7122a8d1bdf0aeced4ba48ecad6
- Old TestBorrower (0x53cdd...) had arbitrary lender injection vulnerability
- Security fix from PR #22 now deployed on mainnet
- Deploy tx: 0x6fbf09875769de685b2118a130ff0b2c1986df29174bd8c2cb7e28062f420350

Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>

* docs: update audit_responses.md with deployed TestBorrower address

- Updated Finding #1 status to FIXED AND DEPLOYED
- Added new TestBorrower mainnet address (0x7e13a21ce933a7122a8d1bdf0aeced4ba48ecad6)
- Updated Finding #7 status to FIXED

Co-Authored-By: Player 53627 <github.stagnate430@passmail.com>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Player 53627 <github.stagnate430@passmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant