Skip to content
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

Add ERC: dApp Security Policy Standard #715

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bernard-wagner
Copy link

@bernard-wagner bernard-wagner commented Nov 11, 2024

Very early draft for the related ENSIP:

ENSIP-XX: Security Policy Records

Author Bernard Wagner(@bernard-wagner)
Status Draft
Submitted TBC

Abstract

This ENSIP extends ENSIP-5: Text Records and defines a record, dappsec, that specifies the location of a security policy as described in ERC-TBC. The text record is intended to be queried by wallets for domains imported using ENSIP-6: DNS-in-ENS, thereby notarising the security policy for a particular domain or subdomain. Wallets can then use the security policy to validate the properties of transaction signing requests based on their HTTP origin. The objective is to mitigate the impact of front-end hacks, such as DNS takeovers or supply-chain compromises of front-end components.

Motivation

Hackers often target dApp front-ends to coerce users into signing transactions that allow the hacker to transfer victims' funds. By introducing a security policy standard, wallet providers can implement safeguards as described in ERC-XXX to protect users against such attacks.

Specification

Introduce a well-known global text record that allows wallet providers to discover the security policy for a hosted dApp using on-chain data.

Example Text Record:

dappsec: uri=https://mywebapp.xyz/.well-known/ensip-xx.json hash=0x-hex-string
  • URI: MUST specify the https or ipfs schemas.
  • Hash: When the location is specified using the https schema, it MUST contain the policy document's keccak256 hash as a 0x-prefixed lowercase hex string. The hash property is OPTIONAL for the ipfs schema, as the policy's integrity is implicit.

@eip-review-bot
Copy link
Collaborator

eip-review-bot commented Nov 11, 2024

File ERCS/erc-dapp-security.md

Requires 1 more reviewers from @axic, @gcolvin, @lightclient, @SamWilsn, @xinbenlv

@eip-review-bot eip-review-bot changed the title Add ERC: dApp Security Policy Add ERC: dApp Security Policy Standard Nov 11, 2024
Copy link

The commit e1a2736 (as a parent of 376e063) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot added the w-ci label Nov 11, 2024
@@ -0,0 +1,111 @@
---
title: dApp Security Policy Standard
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
title: dApp Security Policy Standard
title: dApp Security Policy

Standard is superfluous in an ERC title

description: Defines a document standard for defining the expected on-chain behavior of a dApp frontend.
author: Bernard Wagner (bernard-wagner)
status: Draft
discussions-to: https://ethereum-magicians.org/t/dapp-security-policy/21431
Copy link
Contributor

Choose a reason for hiding this comment

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

The discussions link should be in the ERC category on Eth Magicians. You could move it and add the ERC number or create a new discussions topic which is just a link to this PR.

author: Bernard Wagner (bernard-wagner)
status: Draft
discussions-to: https://ethereum-magicians.org/t/dapp-security-policy/21431
type: Meta
Copy link
Contributor

Choose a reason for hiding this comment

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

Is Meta the correct type for this ERC?

@@ -0,0 +1,111 @@
---
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
---
---
eip: 7817

Assigning next sequential EIP/ERC/RIP number.

Please also update the filename

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants