-
Notifications
You must be signed in to change notification settings - Fork 186
Stellar add security contract field #563
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
Merged
CoveMB
merged 47 commits into
OpenZeppelin:master
from
CoveMB:stellar-add-security-contract-field
Jun 26, 2025
Merged
Changes from 37 commits
Commits
Show all changes
47 commits
Select commit
Hold shift + click to select a range
27ebf04
Before running with prettier
CoveMB 7c7828e
After running with prettier
CoveMB ce5fcd3
Add consistent-type-imports rule
CoveMB 3cd0b59
Add lint step in ci action
CoveMB 31f0c78
resolve prettier conflict
CoveMB 365421b
After running with prettier
CoveMB cedaeaa
resolve prettier conflict
CoveMB 98bd8af
Add lint step in ci action
CoveMB a9098d0
resolve prettier conflict
CoveMB 6e9df26
resolve prettier conflict
CoveMB 574a739
Remove .vscode directory from Git tracking
CoveMB c0e9002
move linter action in it's own job
CoveMB 86c65dc
add lint note in readme
CoveMB a1111d3
Update .github/workflows/test.yml
CoveMB abbd5a4
Merge remote-tracking branch 'upstream/master'
CoveMB beffa34
Merge branch 'master' into master
ericglau d6bec2a
lint script files
CoveMB 315b775
Merge branch 'master' of github.com:CoveMB/contracts-wizard
CoveMB 6ed6e4f
Merge remote-tracking branch 'upstream/master'
CoveMB ea90cd1
Merge remote-tracking branch 'upstream/master'
CoveMB abf687a
Merge remote-tracking branch 'upstream/master'
CoveMB 426b62d
Merge remote-tracking branch 'upstream/master'
CoveMB ea25cc1
Merge remote-tracking branch 'upstream/master'
CoveMB 0911f87
Merge remote-tracking branch 'upstream/master'
CoveMB 4914083
Merge remote-tracking branch 'upstream/master'
CoveMB 5ce527f
Merge remote-tracking branch 'upstream/master'
CoveMB 03a32fc
Merge remote-tracking branch 'upstream/master'
CoveMB b3c0347
Merge remote-tracking branch 'upstream/master'
CoveMB 0a52a65
Merge remote-tracking branch 'upstream/master'
CoveMB 9e74342
Merge remote-tracking branch 'upstream/master'
CoveMB d727f51
Merge remote-tracking branch 'upstream/master'
CoveMB 60fb18f
Merge remote-tracking branch 'upstream/master'
CoveMB cbb7631
Merge remote-tracking branch 'upstream/master'
CoveMB 0f1267f
Merge remote-tracking branch 'upstream/master'
CoveMB 427f4b6
Add securityContact to contract model, print function, ai agent and ui
CoveMB 0fa0cba
update tests snapshots
CoveMB c78d62f
Add changeset
CoveMB a7e69cc
Update packages/core/stellar/src/print.ts
CoveMB 22b1f15
move security documentation after SPDX-License-Identifier
CoveMB 80183c7
Merge branch 'stellar-add-security-contract-field' of github.com:Cove…
CoveMB 9288291
move security documentation after SPDX-License-Identifier
CoveMB 5b1b06b
move security documentation after SPDX-License-Identifier
CoveMB 9a480ee
Merge remote-tracking branch 'upstream/master' into stellar-add-secur…
CoveMB e112b2a
Use simple documentation
CoveMB c510ada
remove unsued variable
CoveMB 1b13223
Resove conflicts
CoveMB 0e67560
Resove conflicts
CoveMB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@openzeppelin/wizard-stellar': patch | ||
| --- | ||
|
|
||
| Add security contact in contract info |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ import test from 'ava'; | |
| import type { BaseFunction, BaseTraitImplBlock } from './contract'; | ||
| import { ContractBuilder } from './contract'; | ||
| import { printContract } from './print'; | ||
| import { TAG_SECURITY_CONTACT } from './set-info'; | ||
|
|
||
| test('contract basics', t => { | ||
| const Foo = new ContractBuilder('Foo'); | ||
|
|
@@ -82,3 +83,9 @@ test('contract with sorted use clauses', t => { | |
| Foo.addUseClause('another::library', 'self', { alias: 'custom1' }); | ||
| t.snapshot(printContract(Foo)); | ||
| }); | ||
|
|
||
| test('contract with info', t => { | ||
| const Foo = new ContractBuilder('Foo'); | ||
| Foo.addDocumentationTag(TAG_SECURITY_CONTACT, '[email protected]'); | ||
| t.snapshot(printContract(Foo)); | ||
| }); | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -140,3 +140,17 @@ Generated by [AVA](https://avajs.dev). | |
| #[contract]␊ | ||
| pub struct Foo;␊ | ||
| ` | ||
|
|
||
| ## contract with info | ||
|
|
||
| > Snapshot 1 | ||
|
|
||
| `// SPDX-License-Identifier: MIT␊ | ||
| // Compatible with OpenZeppelin Stellar Soroban Contracts ^0.2.0␊ | ||
| #![no_std]␊ | ||
| ␊ | ||
| /// @custom:security-contact [email protected]␊ | ||
| ␊ | ||
| #[contract]␊ | ||
| pub struct Foo;␊ | ||
| ` | ||
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| <script lang="ts"> | ||
| import type { Info } from '@openzeppelin/wizard-stellar'; | ||
| import { infoDefaults } from '@openzeppelin/wizard-stellar'; | ||
| import HelpTooltip from '../common/HelpTooltip.svelte'; | ||
|
|
||
| export let info: Info; | ||
| </script> | ||
|
|
@@ -13,6 +14,16 @@ | |
| </label> | ||
| </h1> | ||
|
|
||
| <label class="labeled-input"> | ||
| <span class="flex justify-between pr-2"> | ||
| Security Contact | ||
| <HelpTooltip> | ||
| Where people can contact you to report security issues. Will only be visible if contract metadata is verified. | ||
| </HelpTooltip> | ||
| </span> | ||
| <input bind:value={info.securityContact} placeholder="[email protected]" /> | ||
| </label> | ||
|
|
||
| <label class="labeled-input"> | ||
| <span>License</span> | ||
| <input bind:value={info.license} placeholder={infoDefaults.license} /> | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brozorec @ozgunozerk Would this be the appropriate placement for the security contact comment (and possibly other contract level comments)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following our docstring practice, I suggest this goes like so: