-
Notifications
You must be signed in to change notification settings - Fork 1
fix(dav): stop advertising unimplemented production methods #1296
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
Closed
Closed
Changes from 6 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
2fa2d52
test(dav): reject advertised methods without production handlers
seonghobae 30fa194
fix(dav): expose only production-backed DAV capabilities
seonghobae d343410
test(webdav): forbid demo stores and success-shaped no-op APIs
seonghobae c643583
fix(webdav): remove demo stores and success-shaped no-op APIs
seonghobae 36a6fab
ci(dav): document and compile the production contract once
seonghobae 0c4d8e7
docs(dav): define truthful production capability boundary
seonghobae 57292ec
fix(ci): remove stale DAV mock imports
seonghobae 52302ef
fix(security): require patched nanoid
seonghobae 1ad5192
ci(security): refresh patched nanoid lock once
seonghobae 839f8aa
fix(ci): remove temporary branch publishers
seonghobae 00bb2d6
fix(docs): restore complete changelog
seonghobae fa0ab43
fix(frontend): update nanoid beyond CVE-2026-67214
seonghobae 6ec9b9a
test(security): harden dependency and workflow governance
seonghobae 9bcf66d
test(security): match nanoid advisory ranges
seonghobae 254ba72
merge(develop): resolve DAV capability branch conflicts
cursoragent 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,56 @@ | ||
| name: One-shot DAV production contract integration | ||
|
|
||
| on: | ||
| push: | ||
| branches: [fix/dav-capability-truthfulness-20260809] | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| concurrency: | ||
| group: one-shot-dav-production-contract | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| document-compile-commit: | ||
| if: github.actor != 'github-actions[bot]' | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 10 | ||
| steps: | ||
| - name: Harden runner | ||
| uses: step-security/harden-runner@bf7454d06d71f1098171f2acdf0cd4708d7b5920 # v2.20.0 | ||
| with: | ||
| egress-policy: audit | ||
|
|
||
| - name: Checkout exact branch head | ||
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | ||
| with: | ||
| ref: fix/dav-capability-truthfulness-20260809 | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Record the product contract in CHANGELOG | ||
| shell: python3 {0} | ||
| run: | | ||
| from pathlib import Path | ||
|
|
||
| path = Path('CHANGELOG.md') | ||
| source = path.read_text(encoding='utf-8') | ||
| anchor = '## [Unreleased]\n' | ||
| section = '''## [Unreleased]\n\n### DAV 프로덕션 기능 정합성\n\n- DAV 라우터가 실제 구현된 `OPTIONS`·`PROPFIND`만 등록·광고하도록 축소했습니다. GET/PUT/DELETE/MKCOL/REPORT/PROPPATCH/COPY/MOVE/LOCK/UNLOCK의 성공형 501 스텁을 제거해 미지원 동작은 표준 `405 Method Not Allowed`로 처리하고, WebDAV service의 하드코딩된 demo 계정·폴더·성공형 no-op attachment sync API도 삭제했습니다. 계정·폴더·writeback intent는 데이터베이스와 서버 권한 경계에서만 결정됩니다.\n''' | ||
| if source.count(anchor) != 1: | ||
| raise SystemExit('expected exactly one Unreleased changelog anchor') | ||
| path.write_text(source.replace(anchor, section, 1), encoding='utf-8') | ||
|
|
||
| - name: Compile changed Python modules | ||
| run: | | ||
| python3 -m compileall -q backend/api/dav.py backend/services/webdav_service.py backend/tests/test_dav_api.py backend/tests/test_dav_sync.py | ||
|
|
||
| - name: Commit verified documentation and remove one-shot workflow | ||
| run: | | ||
| set -euo pipefail | ||
| git rm .github/workflows/one-shot-dav-production-contract.yml | ||
| git add CHANGELOG.md | ||
| git config user.name 'github-actions[bot]' | ||
| git config user.email '41898282+github-actions[bot]@users.noreply.github.com' | ||
| git commit -m 'docs(changelog): record DAV production contract' | ||
| git push origin HEAD:fix/dav-capability-truthfulness-20260809 | ||
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 |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # DAV Production Capability Contract | ||
|
|
||
| Naruon exposes only DAV operations that have complete tenant authorization, | ||
| persisted data, deterministic tests, and production handlers. | ||
|
|
||
| ## Supported DAV methods | ||
|
|
||
| | Method | Status | Production behavior | | ||
| | --- | --- | --- | | ||
| | `OPTIONS` | Supported | Returns `DAV: 1` and advertises only `OPTIONS, PROPFIND`. | | ||
| | `PROPFIND` | Supported | Returns tenant-scoped project collections from PostgreSQL. | | ||
|
|
||
| The router does not register `GET`, `PUT`, `DELETE`, `MKCOL`, `REPORT`, | ||
| `PROPPATCH`, `COPY`, `MOVE`, `LOCK`, or `UNLOCK`. FastAPI therefore returns | ||
| `405 Method Not Allowed` rather than exposing success-shaped or `501` stubs. | ||
| Mutation is available only through Naruon's authenticated writeback-intent | ||
| workflow until each DAV verb has provider capability discovery, precondition | ||
| handling (`ETag`/`If-Match` where applicable), durable audit evidence, and real | ||
| connector execution. | ||
|
|
||
| ## Data and identity boundary | ||
|
|
||
| - DAV paths must contain the authenticated owner user ID. | ||
| - Project folders come from the persisted `project_folder` registry and are | ||
| scoped by user and organization. | ||
| - Connected WebDAV accounts come from `webdav_account` records; hard-coded demo | ||
| accounts and folders are forbidden. | ||
| - Runtime code must not return successful attachment synchronization when no | ||
| provider write occurred. | ||
| - XML values are escaped and request-path control characters are encoded before | ||
| logging. | ||
|
|
||
| ## Verification | ||
|
|
||
| Every changed DAV capability requires: | ||
|
|
||
| 1. a fail-first API regression; | ||
| 2. tenant and owner authorization tests; | ||
| 3. positive provider or database integration evidence; | ||
| 4. negative tests for unsupported methods and stale preconditions; | ||
| 5. production statement and branch coverage of 100%; and | ||
| 6. exact-head security and required checks before merge. | ||
|
|
||
| ## Primary standard — APA 7th | ||
|
|
||
| Dusseault, L. (2007). *HTTP extensions for Web Distributed Authoring and | ||
| Versioning (WebDAV)* (RFC 4918). Internet Engineering Task Force. | ||
| https://doi.org/10.17487/RFC4918 |
Oops, something went wrong.
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.