-
Notifications
You must be signed in to change notification settings - Fork 0
docs: align Copilot guidance with ShieldCode #10
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
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 |
|---|---|---|
| @@ -1,33 +1,47 @@ | ||
| # Copilot Instructions — shieldcode | ||
|
|
||
| ## Project Overview | ||
| Aplicação macOS em Swift (baseada em VibeTunnel xcworkspace). | ||
|
|
||
| ShieldCode é uma **skill de segurança para Claude Code**, não um projeto de aplicação. | ||
| O repositório contém documentação, exemplos e regras de hardening para orientar código gerado por IA (principalmente JavaScript/TypeScript e Python). | ||
|
|
||
| ## Stack | ||
| - **Swift 5.9+** | ||
| - **SwiftUI** ou **AppKit** (verificar) | ||
| - **Xcode** workspace | ||
| - macOS target | ||
|
|
||
| - **Markdown + SKILL.md** (`skills/shieldcode/SKILL.md`) como fonte de instruções de implementação segura | ||
| - **JavaScript/TypeScript** e **Python** (exemplos de referência no README, exemplos e skill) | ||
| - **Bash** (`install.sh`, `uninstall.sh`) para instalação/desinstalação | ||
| - **GitHub Actions** para validações | ||
|
|
||
| ## Conventions | ||
| - Swift Concurrency: `async/await`, `actor` para estado compartilhado | ||
| - Memória: sem retain cycles; `[weak self]` em closures que capturam self | ||
| - Sem force unwrap (`!`) exceto em IBOutlets ou casos com invariante claro | ||
| - `os.Logger` em vez de `print` em release | ||
| - Erros via `throws` + `Result` quando assíncrono | ||
| - Entitlements mínimos necessários; sandbox respeitado | ||
|
|
||
| - Seguir **todas** as regras não negociáveis do `skills/shieldcode/SKILL.md`. | ||
| - Segurança por padrão: validação de input, prevenção de injeções, tratamento seguro de erros, autenticação/autorização, headers de segurança e logging sem PII/segredos. | ||
| - Preferir patterns de produção: validação allowlist, queries parametrizadas, erros tipados/mapeados, backoff/jitter para retries e circuit breaker quando aplicável. | ||
|
|
||
| ## Folder Structure | ||
| - `<Module>.xcworkspace` / `<Module>.xcodeproj` — workspace | ||
| - `Sources/` ou `<Module>/` — código Swift | ||
| - `*.entitlements` — entitlements | ||
|
|
||
| - `skills/shieldcode/SKILL.md` — regras principais (obra viva da skill) | ||
| - `examples/` — cenários de vulnerabilidade e versões hardened/vulnerable | ||
| - `.github/workflows/` — CI e automações de validação | ||
| - `install.sh`, `uninstall.sh` — scripts de distribuição/remoção | ||
| - `README.md` — visão de produto, cobertura e uso | ||
|
|
||
| ## Development | ||
| - Abrir workspace no Xcode | ||
| - ⌘B build, ⌘R run, ⌘U test | ||
| - CLI: `xcodebuild` se houver script | ||
|
|
||
| - Não execute build de app; este repositório é documentação e instruções de skill. | ||
| - Para mudanças locais: validar os arquivos alterados em Markdown e scripts de instalação. | ||
| - CLI de referência: | ||
| - `bash -n install.sh` | ||
| - `bash -n uninstall.sh` | ||
| - `sed -n '1,260p' README.md` / `SKILL.md` para manter consistência de orientação | ||
|
|
||
| ## CI / Plugin | ||
|
|
||
| - O CI inclui validação de `install.sh`, `uninstall.sh` e verificação de frontmatter no `SKILL.md`. | ||
| - `plugin.json` não está presente no repositório hoje; o workflow atual trata essa ausência como opcional. | ||
|
|
||
| ## Critical Files | ||
| - `<Module>.xcworkspace` — workspace principal | ||
| - `*.entitlements` — capabilities | ||
| - `Info.plist` — bundle config | ||
|
|
||
| - `skills/shieldcode/SKILL.md` — regras obrigatórias | ||
| - `README.md` — fonte de verdade para o escopo público da skill | ||
| - `.github/copilot-instructions.md` — alinhamento de orientação para Copilot | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.