sp2react 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sp2react-0.1.4/CHANGELOG.md +101 -0
- sp2react-0.1.4/CODE_OF_CONDUCT.md +39 -0
- sp2react-0.1.4/CONTRIBUTING.md +122 -0
- sp2react-0.1.4/GOVERNANCE.md +56 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/MANIFEST.in +2 -0
- {sp2react-0.1.2/src/sp2react.egg-info → sp2react-0.1.4}/PKG-INFO +54 -33
- {sp2react-0.1.2 → sp2react-0.1.4}/README.md +48 -24
- sp2react-0.1.4/ROADMAP.md +40 -0
- sp2react-0.1.4/SECURITY.md +105 -0
- sp2react-0.1.4/THIRD_PARTY_NOTICES.md +23 -0
- sp2react-0.1.4/pyproject.toml +91 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/__init__.py +4 -2
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/agents/core.py +6 -11
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/agents/tasks.py +58 -27
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/analysis/aspx.py +22 -9
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/analysis/behaviors.py +26 -28
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/analysis/fields.py +24 -7
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/analysis/inventory.py +55 -22
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/analysis/jsscan.py +7 -5
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/checks.py +16 -17
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/cli.py +13 -9
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/config.py +29 -9
- sp2react-0.1.4/src/sp2react/container/Dockerfile +21 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/dbmap.py +12 -13
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/llm/providers.py +26 -21
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/migrate.py +118 -42
- sp2react-0.1.4/src/sp2react/model.py +288 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/net.py +5 -5
- sp2react-0.1.4/src/sp2react/ntlm.py +197 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/pipeline.py +83 -38
- sp2react-0.1.4/src/sp2react/sandbox.py +220 -0
- sp2react-0.1.4/src/sp2react/sandbox_guard.py +201 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/generate.py +88 -13
- sp2react-0.1.4/src/sp2react/scaffold/released_templates.json +149 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/app/api.py +75 -15
- sp2react-0.1.4/src/sp2react/scaffold/templates/backend/app/auth.py +45 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/app/main.py +8 -3
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/app/odata.py +9 -2
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/app/rules.py +2 -6
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/app/sp_repo.py +55 -14
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/app/sql_repo.py +22 -5
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/app/store.py +1 -1
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/api.ts +11 -11
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/components/sp/GenericPage.tsx +1 -1
- sp2react-0.1.4/src/sp2react/scaffold/templates/frontend/src/components/sp/LegacyHtml.tsx +8 -0
- sp2react-0.1.4/src/sp2react/scaffold/templates/frontend/src/components/sp/ListView.tsx +85 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/components/sp/fields.tsx +27 -1
- sp2react-0.1.4/src/sp2react/scaffold/templates/frontend/src/runtime/caml.ts +141 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/runtime/format.ts +3 -0
- sp2react-0.1.4/src/sp2react/scaffold/templates/frontend/src/runtime/sanitize.ts +181 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/runtime/spec.ts +1 -1
- sp2react-0.1.4/src/sp2react/scaffold/templates/frontend/src/runtime/values.ts +59 -0
- sp2react-0.1.4/src/sp2react/scaffold/templates/frontend/src/runtime/views.ts +43 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/screens/ListFormScreen.tsx +2 -3
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/styles/sp.css +3 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/sharepoint/client.py +96 -47
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/sharepoint/extract.py +66 -26
- sp2react-0.1.4/src/sp2react/spec/__init__.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/spec/base.py +6 -5
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/spec/coverage.py +10 -6
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/spec/model.py +13 -2
- sp2react-0.1.4/src/sp2react/transport.py +326 -0
- sp2react-0.1.4/src/sp2react/yamlish.py +427 -0
- {sp2react-0.1.2 → sp2react-0.1.4/src/sp2react.egg-info}/PKG-INFO +54 -33
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react.egg-info/SOURCES.txt +29 -1
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react.egg-info/requires.txt +1 -4
- sp2react-0.1.4/tests/conftest.py +76 -0
- sp2react-0.1.4/tests/fuzz/fuzz_config_yaml.py +32 -0
- sp2react-0.1.4/tests/fuzz/fuzz_legacy_code.py +29 -0
- sp2react-0.1.4/tests/fuzz/fuzz_spec.py +32 -0
- sp2react-0.1.4/tests/fuzz/fuzz_wire.py +50 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/migrated_db.py +7 -4
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/mock_sharepoint.py +8 -0
- sp2react-0.1.4/tests/test_fidelity.py +170 -0
- sp2react-0.1.4/tests/test_hardening.py +336 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/test_network.py +7 -4
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/test_pipeline.py +12 -6
- sp2react-0.1.4/tests/test_sandbox.py +392 -0
- sp2react-0.1.4/tests/test_stdlib.py +249 -0
- sp2react-0.1.4/tests/test_threat_model.py +224 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/ui_walkthrough.py +4 -3
- sp2react-0.1.4/vex.openvex.json +10 -0
- sp2react-0.1.2/CHANGELOG.md +0 -40
- sp2react-0.1.2/SECURITY.md +0 -47
- sp2react-0.1.2/pyproject.toml +0 -62
- sp2react-0.1.2/src/sp2react/scaffold/templates/backend/app/auth.py +0 -33
- sp2react-0.1.2/src/sp2react/scaffold/templates/frontend/src/components/sp/LegacyHtml.tsx +0 -9
- sp2react-0.1.2/src/sp2react/scaffold/templates/frontend/src/components/sp/ListView.tsx +0 -59
- sp2react-0.1.2/tests/conftest.py +0 -4
- {sp2react-0.1.2 → sp2react-0.1.4}/LICENSE +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/setup.cfg +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/setup.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/agents/__init__.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/agents/prompts/dbmap.md +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/agents/prompts/fix.md +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/agents/prompts/handler.md +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/agents/prompts/page.md +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/agents/prompts/review.md +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/agents/prompts/spec.md +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/analysis/__init__.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/llm/__init__.py +0 -0
- /sp2react-0.1.2/src/sp2react/scaffold/__init__.py → /sp2react-0.1.4/src/sp2react/py.typed +0 -0
- {sp2react-0.1.2/src/sp2react/scaffold/templates/backend/app → sp2react-0.1.4/src/sp2react/scaffold}/__init__.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/rule_vectors.json +0 -0
- {sp2react-0.1.2/src/sp2react/sharepoint → sp2react-0.1.4/src/sp2react/scaffold/templates/backend/app}/__init__.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/app/custom/__init__.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/requirements.txt +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/tests/conftest.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/backend/tests/test_rule_vectors.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/index.html +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/package.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/scripts/check-rules.ts +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/components/sp/Banner.tsx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/components/sp/DataTable.tsx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/components/sp/Form.tsx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/components/sp/Layout.tsx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/components/sp/Tiles.tsx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/custom/types.ts +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/main.tsx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/runtime/rules.ts +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/runtime/user.tsx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/screens/LegacyRedirect.tsx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/src/vite-env.d.ts +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/tsconfig.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react/scaffold/templates/frontend/vite.config.ts +0 -0
- {sp2react-0.1.2/src/sp2react/spec → sp2react-0.1.4/src/sp2react/sharepoint}/__init__.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react.egg-info/dependency_links.txt +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react.egg-info/entry_points.txt +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/src/sp2react.egg-info/top_level.txt +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/agent_responses/dbmap/mapping.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/agent_responses/page/Dashboard.txt +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/agent_responses/spec/Dashboard.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/agent_responses/spec/VendorRequests-form.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/files/Lists/VendorRequests/Attachments/2/customs-bond.pdf +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/files/SiteAssets/css/dashboard.css +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/files/SiteAssets/css/vendor-request.css +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/files/SiteAssets/html/review-instructions.html +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/files/SiteAssets/js/dashboard.js +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/files/SiteAssets/js/jquery-1.12.4.min.js +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/files/SiteAssets/js/jquery.SPServices-2014.02.min.js +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/files/SiteAssets/js/vendor-request-form.js +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/ComplianceAlerts/fields.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/ComplianceAlerts/items.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/CostCenters/fields.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/CostCenters/items.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/Countries/fields.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/Countries/items.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/Departments/fields.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/Departments/items.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/VendorRequests/fields.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/lists/VendorRequests/items.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/pages/Lists/VendorRequests/DispForm.aspx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/pages/Lists/VendorRequests/EditForm.aspx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/pages/Lists/VendorRequests/NewForm.aspx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/pages/SitePages/Dashboard.aspx +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/pages/SitePages/Dashboard.aspx.webparts.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/rendered/SitePages/Dashboard.html +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/site.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/fixtures/legacy-site/siteusers.json +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/scripted_agents.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/test_agents.py +0 -0
- {sp2react-0.1.2 → sp2react-0.1.4}/tests/test_extract_inventory.py +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `sp2react` are documented here.
|
|
4
|
+
|
|
5
|
+
## [0.1.4] - 2026-11-19
|
|
6
|
+
|
|
7
|
+
OpenSSF Best Practices silver and baseline groundwork, as in lodestream and mssql-ocp-migrate, and the fixes its threat model found. Each fix has a test in `tests/test_threat_model.py` that fails on 0.1.3.
|
|
8
|
+
|
|
9
|
+
### Security
|
|
10
|
+
- `extract`: a page or asset URL from the site with `..` segments (for example `<script src="/sites/x/../../../y.js">` in a page) was written relative to the workspace, so a page editor could make sp2react write files outside it. Every file the extract writes (page source, web part, wiki and rendered sidecars, assets, list folders) is now checked (`..`, absolute and drive paths, symlinks) and a refused one is listed as an extraction error, before it is downloaded
|
|
11
|
+
- `migrate`: attachment names and item ids from the server are checked the same way before the attachment is downloaded and written to the export folder
|
|
12
|
+
- The generated app's builds and tests (which run agent-written handlers) no longer receive sp2react's own credentials: the variables named in `sharepoint.*_env`, `llm.api_key_env` and `database.url_env` are removed from their environment
|
|
13
|
+
- Spec screen ids must be plain names (letters, digits, `_`, `-`, `.`, at most 128 characters), since they become folder and file names; generated ids longer than 100 characters are shortened and keep a hash of the full name
|
|
14
|
+
- **The generated app's back-end tests and loader run in a sandbox** (`pipeline.sandbox`, default `auto`). They import custom handlers written by agents, which until now ran as ordinary processes with the user's file and network access. `container` runs them in a throwaway Docker or Podman container with no network (or only the database host), a read-only file system except the folder the step writes, no capabilities, a non-root user and none of the host's environment; `guard` (used by `auto` when no container runtime answers) runs them under an audit hook that refuses writes outside that folder, new processes, other network hosts and `ctypes`; `off` keeps plain processes. Set `pipeline.sandbox_image` to use a check image from your registry
|
|
15
|
+
- **NTLM is an explicit, TLS-only choice.** `sharepoint.auth` has no default any more (NTLMv2 needs MD4 and HMAC-MD5 by protocol), and NTLM is never answered over plain HTTP (the site URL or any later request, so a redirect cannot downgrade it) unless `sharepoint.allow_ntlm_over_http: true`. The generated app's SharePoint data source does the same (`SP_AUTH` required, `SP_ALLOW_NTLM_OVER_HTTP=1`). **Upgrade note:** a config without `sharepoint.auth` now fails with "Field required"; add `auth: ntlm` (or `cookie`, `bearer`, `none`). Configs written by `sp2react init` already have it
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- Generated app: `startswith`, `endswith` and `substringof` in `$filter` with a number instead of quoted text (`endswith(Title,0)`) failed with a server error; they now answer 400 like any other bad filter (found by ClusterFuzzLite). With `DATA_SOURCE=database`, `%` and `_` in their text are matched literally, as SharePoint and the other data sources do, instead of acting as SQL wildcards. Regenerating an existing app picks this up (`odata.py`, `sql_repo.py`; files you changed are kept)
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
- `GOVERNANCE.md`, `CODE_OF_CONDUCT.md`, `ROADMAP.md`, a VEX document (`vex.openvex.json`), and in the documentation a security assurance case (threat model), a dependency and scanning policy, testing and releasing pages
|
|
22
|
+
- Pull requests: a DCO check (every commit signed off) and GitHub dependency review
|
|
23
|
+
- CI: statement coverage must stay at 80% or more (about 86% now); a job builds the package twice and checks the files are identical, and releases are built the same way (`SOURCE_DATE_EPOCH`, `ci/reproducible_sdist.py`); the vulnerability audit also checks versions pinned only for other Python versions (`ci/all_pins.py`); Dependabot watches the fuzzing image
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- `mypy --strict` and `ruff` with the Bandit security rules (`S`), comprehensions, `PIE` and `RUF` are clean and required
|
|
27
|
+
- CI tool locks are compiled for the Python versions their jobs run (build 3.11, e2e 3.12)
|
|
28
|
+
- Documentation reorganised into Getting started, User guide, Reference, Development and Release notes; installation covers offline installs and verifying a download's signature, and the JFrog Curation notes no longer list the dependencies removed in 0.1.3
|
|
29
|
+
|
|
30
|
+
## [0.1.3] - 2026-11-19
|
|
31
|
+
|
|
32
|
+
Fixes found in a review of 0.1.2, no runtime dependencies, and the release standards of mssql-ocp-migrate and lodestream. Each fix has a test (`tests/test_hardening.py`, `tests/test_fidelity.py`, `tests/test_stdlib.py`) that fails on 0.1.2.
|
|
33
|
+
|
|
34
|
+
### Security
|
|
35
|
+
- Generated app: the catch-all route that serves the front end could return any file on the server (`/..%2fbackend%2f.env`, `/%2Fetc%2Fhostname`). It now serves only files inside `FRONTEND_DIST`
|
|
36
|
+
- Generated app: `AUTH_MODE` now defaults to `header` and fails closed (401 without the identity header). `dev` must be set explicitly, accepts requests from the same machine only, and no longer takes the user from the `?as=` query parameter. **Upgrade note:** set `AUTH_MODE=dev` when you run the app locally (the generated `.env.example` already does)
|
|
37
|
+
- Generated app: `/api/screens` and `/api/specs/{id}` now need a signed-in user
|
|
38
|
+
- Generated app: deleting an item and adding or removing attachments now follow the same role and lock rules as editing it (a locked item answered 204 to `DELETE`); attachment names are checked (no `/`, `\`, `..`, leading dots)
|
|
39
|
+
- Generated app: legacy Content Editor / Script Editor markup is rebuilt from an allow-list (`runtime/sanitize.ts`) instead of three regular expressions that `<svg/onload>`, unquoted and entity-encoded `javascript:` links got past
|
|
40
|
+
- Generated app (`DATA_SOURCE=sharepoint`): a user is matched by exact login, not by the first login that contains the text
|
|
41
|
+
- Agents: file paths proposed by the page, handler and fix agents must be plain relative paths inside the screen's folder; a path with `..` could overwrite `frontend/vite.config.ts` or write outside the output folder. Custom handler names must be identifiers
|
|
42
|
+
|
|
43
|
+
### Fixed
|
|
44
|
+
- Columns whose internal name starts with `_` or a digit (`2nd Approver` is `_x0032_nd_x0020_Approver`, `OData__x0032_nd_x0020_Approver` in REST) were migrated empty while the reconciliation said every list matched. Fields now record their REST name (`rest_name`), migration and the SharePoint data source read it, and specs from 0.1.2 work through the same naming rule. Reconciliation now fails when a field is in no exported item
|
|
45
|
+
- SharePoint throttling (429, 503) and dropped connections are retried with `Retry-After` (`sharepoint.retries`, `sharepoint.max_retry_wait`). If a list's fields or views, or a page's source, still cannot be read, `extract` fails instead of passing with an empty screen
|
|
46
|
+
- List pages: the "Title (linked to item)" column (`LinkTitle`) showed an empty column headed "LinkTitle"; it is now the Title column linked to the item. The page opens the list's default view with that view's sort order, instead of sorting by `ID desc`
|
|
47
|
+
- Two pages with the same file name in different libraries (`SitePages/Home.aspx`, `Pages/Home.aspx`) no longer share one screen id: both get their folder in the id
|
|
48
|
+
- Regenerating the app overwrote files the team had changed, such as `backend/app/auth.py`. A changed file is now kept, and the new version is written next to it as `<file>.sp2react-new`. Apps generated by 0.1.0 to 0.1.2 are recognised, so their unchanged files are still updated
|
|
49
|
+
- Multi-value lookup columns were edited as a single choice and an edit kept one value; they are now a multi-select list and every value is saved
|
|
50
|
+
- Date-and-time columns showed the UTC clock as local time on the edit form, and saved values had no zone. They are now edited in the browser's time zone and stored in UTC (`...Z`), as SharePoint returns them; values with an offset are converted by the API
|
|
51
|
+
- Hyperlink columns lost their description; they are now `{url, description}` everywhere (form, list, migration, reconciliation; a `description_column` in the database mapping). Managed metadata was stored as the raw REST object (`[object Object]`); terms are now `{label, term_id}` with the label read from the field's hidden note column, shown read-only
|
|
52
|
+
- List views ignored the view's filter and showed only the first page. The `<Where>` of the view is translated to the API filter (comparisons, And/Or, In, Contains, BeginsWith, IsNull, `<UserID />`, `<Today />`), a filter that cannot be translated is reported on the page, and the list pages through all items
|
|
53
|
+
- The list API returned every row when `$top` was not given; like SharePoint it now answers 100 rows by default and at most 5,000
|
|
54
|
+
- Wiki pages: their text lives in the page's `WikiField` column, which was never read, so a wiki page converted to an empty screen. It is now extracted and treated like Content Editor text
|
|
55
|
+
- A list whose URL name contains a space failed the spec gate (`endpoint path ... must contain only path characters`); the API client now also encodes list names in URLs
|
|
56
|
+
|
|
57
|
+
### Added
|
|
58
|
+
- Supply chain, as in mssql-ocp-migrate and lodestream: hash-locked CI tool sets (`ci/requirements-*.txt`), a `zero-deps` job that installs and runs the package with nothing else installed, weekly `pip-audit` of every tool set and of the generated app's back end plus `npm audit` of its front end, ClusterFuzzLite fuzzing (`tests/fuzz`: config YAML, spec validation, ASPX/JavaScript analysis, NTLM challenges, the generated API's `$filter` parser), and an end-to-end workflow that runs `data_source: database` against real MySQL 8.4 and SQL Server 2022 containers
|
|
59
|
+
- Releases: published from GitHub releases only, with a check that the wheel declares no runtime dependencies, a CycloneDX SBOM, PyPI attestations, and Sigstore-signed wheel, sdist and SBOM on the GitHub release; `verify-release.yml` checks the signatures and that PyPI serves the same files
|
|
60
|
+
- Documentation site configuration for Read the Docs (Sphinx + MyST, warnings are errors), `CONTRIBUTING.md`, `THIRD_PARTY_NOTICES.md`; `ruff` and `mypy` clean
|
|
61
|
+
|
|
62
|
+
### Changed
|
|
63
|
+
- **No runtime dependencies.** `requests`, `requests-ntlm`, `pydantic` and `PyYAML` are replaced by standard-library code in the package: an HTTP client (`transport.py`: TLS verification or a CA bundle, proxies from `HTTPS_PROXY`/`NO_PROXY`, redirects checked hop by hop by the network policy), NTLMv2 Windows sign-in with channel binding on HTTPS (`ntlm.py`, checked against the MS-NLMP test vectors), validated records (`model.py`) and a YAML reader for the config file (`yamlish.py`, which refuses anchors, tags, tabs and duplicate keys with a line number). `pip install sp2react` installs one wheel. The `ntlm` extra remains, empty
|
|
64
|
+
- Docs: workflows, event receivers, InfoPath and Power Apps are listed as not detected (they were described as reported); remaining known gaps are listed in [Coverage and limitations](https://sp2react.readthedocs.io/en/latest/user_guide/limitations.html)
|
|
65
|
+
|
|
66
|
+
## [0.1.2] - 2026-10-29
|
|
67
|
+
|
|
68
|
+
### Security
|
|
69
|
+
- Generated app front-end template moved to versions with no known vulnerabilities: Vite 6.4.4+ (was 5.4), react-router-dom 7.18.4+ (was 6.28), @vitejs/plugin-react 4.7. `npm audit` on the template reports 0 vulnerabilities; the generated app builds and passes the 29-step browser walkthrough
|
|
70
|
+
- Minimum versions raised past every known advisory: `requests>=2.33.0` (package and generated back end), `pymysql>=1.1.1` (`mysql` extra), `pytest>=9.0.3` (`dev` extra)
|
|
71
|
+
|
|
72
|
+
### Added
|
|
73
|
+
- Dependabot for GitHub Actions, pip and the generated app templates
|
|
74
|
+
- CodeQL code scanning (Python, JavaScript/TypeScript)
|
|
75
|
+
- `setup.py` shim for tools that still call it
|
|
76
|
+
|
|
77
|
+
## [0.1.1] - 2026-10-29
|
|
78
|
+
|
|
79
|
+
### Added
|
|
80
|
+
- End-to-end documentation in `docs/`: how it works, installation (Windows, JFrog), configuration reference, Bridger and other model providers, SQL Server / MySQL / PostgreSQL and the mapping file, a full walkthrough, command reference, the generated app and deployment, security, troubleshooting, Python API, coverage and limitations
|
|
81
|
+
|
|
82
|
+
### Changed
|
|
83
|
+
- `sp2react init` template and the generated `.env.example` show SQL Server connection URLs and `database.schema_name`
|
|
84
|
+
- README: run the generated API with `uvicorn --env-file .env` (the app does not load `.env` by itself)
|
|
85
|
+
- CI: every GitHub Action pinned to a commit SHA; Scorecard uses an existing `ossf/scorecard-action` release
|
|
86
|
+
|
|
87
|
+
## [0.1.0] - 2026-10-29
|
|
88
|
+
|
|
89
|
+
First public release.
|
|
90
|
+
|
|
91
|
+
### Added
|
|
92
|
+
- Ten-stage pipeline (inputs, extract, inventory, spec, approve spec, convert, review, test, fix, approve) with gating: a stage only starts when the one before it is done
|
|
93
|
+
- Read-only SharePoint extraction: `.aspx` source, browser-added web parts, Script Editor / Content Editor content and links, JSLink, custom scripts and CSS, list schemas, views, forms, groups, navigation
|
|
94
|
+
- Inventory of jQuery / SPServices behaviour with file:line references (show/hide, read-only, defaults, cascades, PreSaveAction validation, group checks, redirects, REST and SPServices calls)
|
|
95
|
+
- Spec model, deterministic base spec and a coverage gate that blocks approval until every required behaviour is covered and legacy texts are verbatim
|
|
96
|
+
- AI agents (Claude through GitHub Copilot Bridger by default; Anthropic, OpenAI and Azure OpenAI also supported) for spec, page, custom handler, review, fix and database mapping, each validated before its output is accepted
|
|
97
|
+
- Generated React (Vite + TypeScript) + FastAPI app: shared list-form engine driven by the spec, the same rule engine in the browser and the API (checked by shared test vectors), legacy URL redirects, SharePoint groups as roles
|
|
98
|
+
- `data_source: database`: the generated API reads and writes your existing tables (MySQL, SQL Server, PostgreSQL via SQLAlchemy) through a reviewed list-to-table mapping drafted by `sp2react map-db`; filters, sorting and paging run as SQL
|
|
99
|
+
- `data_source: sqlite`: full paged export of list items and attachments, loaded into a SQLite copy
|
|
100
|
+
- Field-by-field reconciliation report between SharePoint lists and the app's data (opt-in in database mode)
|
|
101
|
+
- Network policy: every request is checked against the configured SharePoint and model hosts, including redirects; list items, attachments, people and rendered pages are never read in database mode
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
We want sp2react to be a project where anyone can ask a question, report a problem or contribute
|
|
4
|
+
without being made to feel unwelcome.
|
|
5
|
+
|
|
6
|
+
## Expected behaviour
|
|
7
|
+
|
|
8
|
+
- Be respectful and patient, including with people who are new to the project or to the technologies it
|
|
9
|
+
touches (SharePoint, React, FastAPI, the model provider).
|
|
10
|
+
- Discuss ideas and code, not people. Critique is welcome when it is specific and constructive.
|
|
11
|
+
- Assume good intent, and ask before concluding otherwise.
|
|
12
|
+
- Respect people's time and privacy: don't share someone else's private information, and remove
|
|
13
|
+
confidential data (host names, credentials, list data, page content) from logs before posting them.
|
|
14
|
+
|
|
15
|
+
## Unacceptable behaviour
|
|
16
|
+
|
|
17
|
+
- Harassment, insults, intimidation or personal attacks of any kind.
|
|
18
|
+
- Discriminatory language or conduct based on any personal characteristic.
|
|
19
|
+
- Sexual language or imagery, and unwelcome attention.
|
|
20
|
+
- Publishing others' private information without their permission.
|
|
21
|
+
- Sustained disruption of discussions, or encouraging any of the above.
|
|
22
|
+
|
|
23
|
+
## Scope
|
|
24
|
+
|
|
25
|
+
This applies in all project spaces (issues, pull requests, discussions, reviews) and when someone
|
|
26
|
+
represents the project elsewhere.
|
|
27
|
+
|
|
28
|
+
## Reporting and enforcement
|
|
29
|
+
|
|
30
|
+
Report a problem privately to the maintainer, Karthikeyan Balasundaram ([@karthikbd](https://github.com/karthikbd)),
|
|
31
|
+
using the contact details on that GitHub profile. If the report is sensitive you can also use the
|
|
32
|
+
repository's private reporting form (Security → Report a vulnerability); say in the title that it is a
|
|
33
|
+
conduct report. Reports are kept confidential.
|
|
34
|
+
|
|
35
|
+
The maintainer will review every report, may ask for more information, and will respond within 7 days.
|
|
36
|
+
Possible actions, depending on severity: a private warning, removal of the offending content, a
|
|
37
|
+
temporary or permanent ban from project spaces. If a report concerns the maintainer, it will be handled
|
|
38
|
+
by another maintainer once there is one; until then you may raise it with GitHub through its
|
|
39
|
+
[reporting tools](https://docs.github.com/en/communities/maintaining-your-safety-on-github/reporting-abuse-or-spam).
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Contributing to sp2react
|
|
2
|
+
|
|
3
|
+
Thanks for helping. Bug reports, documentation fixes, new SharePoint patterns the analysis should recognise and better generated code are all welcome.
|
|
4
|
+
|
|
5
|
+
## Reporting bugs and asking questions
|
|
6
|
+
|
|
7
|
+
- **Bugs and feature requests:** open a [GitHub issue](https://github.com/karthikbd/sp2react/issues).
|
|
8
|
+
Include the sp2react version (`sp2react --version`), Python version, SharePoint version, the
|
|
9
|
+
command you ran, and the output of `sp2react doctor` if it is relevant. Remove host names,
|
|
10
|
+
credentials, list data and page content you can't share.
|
|
11
|
+
- **Security vulnerabilities:** do **not** open a public issue. Report them privately as described in
|
|
12
|
+
[SECURITY.md](SECURITY.md).
|
|
13
|
+
|
|
14
|
+
The maintainer aims to respond to new issues within 7 days.
|
|
15
|
+
|
|
16
|
+
## Making a change
|
|
17
|
+
|
|
18
|
+
1. Open an issue first for anything larger than a small fix, so the approach can be agreed.
|
|
19
|
+
2. Fork the repository and create a branch from `main`. `main` only accepts pull requests whose
|
|
20
|
+
required checks pass; nobody, including the maintainer, pushes to it directly.
|
|
21
|
+
3. Set up a development environment:
|
|
22
|
+
|
|
23
|
+
```console
|
|
24
|
+
$ python -m venv .venv && . .venv/bin/activate
|
|
25
|
+
$ pip install --require-hashes -r ci/requirements-test.txt
|
|
26
|
+
$ pip install --no-deps -e .
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
4. Make the change, **with tests** (see below), and update the documentation in `docs/` and
|
|
30
|
+
`CHANGELOG.md` when behaviour changes. Sign off every commit (`git commit -s`, see
|
|
31
|
+
*Developer Certificate of Origin* below).
|
|
32
|
+
5. Run the checks CI runs:
|
|
33
|
+
|
|
34
|
+
```console
|
|
35
|
+
$ ruff check src tests # lint: must be clean
|
|
36
|
+
$ mypy src # types: must be clean
|
|
37
|
+
$ python -m coverage run -m pytest -q # unit, pipeline, generated-app and over-the-wire HTTP tests (Node 22 for the TypeScript ones)
|
|
38
|
+
$ python -m coverage report # statement coverage must stay at 80% or more
|
|
39
|
+
$ python -m sphinx -W -b html docs docs/_build/html # docs: warnings are errors
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
6. Open a pull request against `main`. CI runs the tests on Python 3.10–3.13, the end-to-end suite
|
|
43
|
+
against MySQL 8.4 and SQL Server 2022, a reproducible-build check, CodeQL, dependency review, the
|
|
44
|
+
DCO check, a vulnerability audit and ClusterFuzzLite fuzzing. All of them must pass.
|
|
45
|
+
|
|
46
|
+
## Code review
|
|
47
|
+
|
|
48
|
+
Every change is reviewed before it is merged:
|
|
49
|
+
|
|
50
|
+
- the reviewer checks that the change does what the pull request says, has tests that would fail
|
|
51
|
+
without it, keeps the documentation and changelog current, introduces no new runtime dependency or
|
|
52
|
+
network access, and does not weaken the security properties in the documentation's
|
|
53
|
+
*Security assurance case* (new inputs, files written, connections or generated-app endpoints are added to it);
|
|
54
|
+
- a change to `scaffold/templates` says whether existing generated apps must be regenerated, and keeps
|
|
55
|
+
the browser and API rule engines in agreement (`scaffold/rule_vectors.json`);
|
|
56
|
+
- all required checks must pass: tests, lint, types, coverage, docs, reproducible build, CodeQL,
|
|
57
|
+
dependency review and the DCO check;
|
|
58
|
+
- review comments are resolved before merging. While the project has one maintainer, the maintainer's
|
|
59
|
+
own pull requests are checked against the same list; a second reviewer is a goal (see
|
|
60
|
+
[ROADMAP.md](ROADMAP.md)).
|
|
61
|
+
|
|
62
|
+
Good first contributions are labelled
|
|
63
|
+
[`good first issue`](https://github.com/karthikbd/sp2react/labels/good%20first%20issue).
|
|
64
|
+
|
|
65
|
+
## Coding standards
|
|
66
|
+
|
|
67
|
+
- Python code follows [PEP 8](https://peps.python.org/pep-0008/) as enforced by `ruff` with the rule sets
|
|
68
|
+
in `pyproject.toml` (pycodestyle, pyflakes, bugbear, simplify, Bandit security rules, comprehensions,
|
|
69
|
+
ruff-specific rules), and is fully typed: `mypy` runs in **strict** mode.
|
|
70
|
+
- The generated app's TypeScript is type-checked (`tsc --noEmit`) and built in the tests.
|
|
71
|
+
- Both run in CI on every push and pull request and must be clean.
|
|
72
|
+
|
|
73
|
+
## Rules for code
|
|
74
|
+
|
|
75
|
+
- **No runtime dependencies.** sp2react must install and run with the Python standard library only.
|
|
76
|
+
The database extras (SQLAlchemy and a driver) are imported inside the functions that need them.
|
|
77
|
+
The `zero-deps` CI job installs the package alone and runs it.
|
|
78
|
+
- **No network access except to configured systems.** Only `src/sp2react/transport.py` opens
|
|
79
|
+
connections, every request passes `net.NetworkPolicy`, and SharePoint is read with GET only.
|
|
80
|
+
`tests/test_network.py` enforces this.
|
|
81
|
+
- **Agents never write unchecked output.** Anything an agent returns is validated in
|
|
82
|
+
`agents/tasks.py` before it is accepted, and file paths must stay inside their screen's folder.
|
|
83
|
+
- **Tests are required.** New functionality needs tests that would fail without it; bug fixes need a
|
|
84
|
+
regression test. Code that talks to SharePoint needs a test against the mock site
|
|
85
|
+
(`tests/mock_sharepoint.py`); database code runs in the end-to-end job against real servers.
|
|
86
|
+
The browser and API rule engines must agree on `scaffold/rule_vectors.json`.
|
|
87
|
+
- **Legacy pages, agent output and configs are untrusted.** Parsing code should have a fuzz target in
|
|
88
|
+
`tests/fuzz` (Atheris).
|
|
89
|
+
- **Style:** `ruff` and `mypy --strict` clean.
|
|
90
|
+
- **CI tooling is hash-locked.** To change a tool version, edit `ci/requirements-*.in` and regenerate
|
|
91
|
+
the `.txt` file with `uv pip compile --universal --generate-hashes --python-version 3.X ci/requirements-X.in -o ci/requirements-X.txt`,
|
|
92
|
+
using the lowest Python version of the jobs that install it (see the header of each `.txt` file).
|
|
93
|
+
GitHub Actions are pinned by commit SHA.
|
|
94
|
+
|
|
95
|
+
## Developer Certificate of Origin (DCO)
|
|
96
|
+
|
|
97
|
+
By contributing you certify the [Developer Certificate of Origin 1.1](https://developercertificate.org/):
|
|
98
|
+
that you wrote the change or otherwise have the right to submit it under the project's license. Show this
|
|
99
|
+
by adding a `Signed-off-by` line with your real name and e-mail to every commit (`git commit -s`). The
|
|
100
|
+
`DCO` check fails a pull request that has an unsigned commit; fix it with
|
|
101
|
+
`git rebase --signoff main` and a force-push to your branch.
|
|
102
|
+
|
|
103
|
+
## Licensing of contributions
|
|
104
|
+
|
|
105
|
+
sp2react is MIT-licensed. By submitting a pull request you agree that your contribution is licensed
|
|
106
|
+
under the same [MIT License](LICENSE), and you confirm you have the right to submit it. Code copied
|
|
107
|
+
from other projects must have a compatible license and be recorded in `THIRD_PARTY_NOTICES.md`.
|
|
108
|
+
|
|
109
|
+
## Releases
|
|
110
|
+
|
|
111
|
+
Releases follow [semantic versioning](https://semver.org/) and are described in `CHANGELOG.md`. To release:
|
|
112
|
+
bump the version in `pyproject.toml` and `src/sp2react/__init__.py`, date the CHANGELOG entry, add the release's
|
|
113
|
+
template hashes to `src/sp2react/scaffold/released_templates.json`, merge to `main`, then publish a GitHub release
|
|
114
|
+
`vX.Y.Z`. `python-publish.yml` tests, builds, publishes with Trusted Publishing and signs the assets;
|
|
115
|
+
`verify-release.yml` then checks the signatures and the files on PyPI. The full checklist is in the
|
|
116
|
+
documentation's *Releasing* page.
|
|
117
|
+
|
|
118
|
+
## Project
|
|
119
|
+
|
|
120
|
+
- [Governance](GOVERNANCE.md): roles, decisions, who holds which keys, continuity.
|
|
121
|
+
- [Roadmap](ROADMAP.md): plans for the next 12 months.
|
|
122
|
+
- [Code of Conduct](CODE_OF_CONDUCT.md): applies in every project space.
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# Governance
|
|
2
|
+
|
|
3
|
+
sp2react is a small project with a single maintainer. This document says who decides what, who holds
|
|
4
|
+
which keys, and what happens if the maintainer becomes unavailable. It changes through a pull request
|
|
5
|
+
like any other file.
|
|
6
|
+
|
|
7
|
+
## Roles
|
|
8
|
+
|
|
9
|
+
| Role | Who | Responsibilities |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| **Maintainer** | Karthikeyan Balasundaram ([@karthikbd](https://github.com/karthikbd)) | Sets direction (see [ROADMAP.md](ROADMAP.md)); reviews and merges pull requests; cuts releases; answers security reports (see [SECURITY.md](SECURITY.md)); keeps CI, dependencies and documentation current; enforces the [Code of Conduct](CODE_OF_CONDUCT.md). |
|
|
12
|
+
| **Contributor** | Anyone who opens an issue or pull request | Follows [CONTRIBUTING.md](CONTRIBUTING.md), signs off commits (DCO), keeps changes tested and documented. |
|
|
13
|
+
| **Security reporter** | Anyone | Reports vulnerabilities privately as described in [SECURITY.md](SECURITY.md); is credited unless they ask not to be. |
|
|
14
|
+
|
|
15
|
+
## Decisions
|
|
16
|
+
|
|
17
|
+
- Day-to-day decisions (accepting a pull request, scheduling a release) are made by the maintainer, in
|
|
18
|
+
the open: in the pull request or issue concerned.
|
|
19
|
+
- Larger changes (a new stage or agent, a change to the generated app's layout or API, a breaking
|
|
20
|
+
change to `sp2react.yaml`, a new runtime dependency, which is normally refused) start as an issue so they can be discussed before code is written.
|
|
21
|
+
- Disagreements are settled by discussion on the issue; if that doesn't settle them, the maintainer
|
|
22
|
+
decides and records the reasoning there.
|
|
23
|
+
|
|
24
|
+
## Access to sensitive resources
|
|
25
|
+
|
|
26
|
+
Everyone with access is listed here; there is no other access.
|
|
27
|
+
|
|
28
|
+
| Resource | Who has access | Notes |
|
|
29
|
+
|---|---|---|
|
|
30
|
+
| GitHub repository (admin) | Maintainer | Two-factor authentication required. `main` accepts changes only through pull requests with passing checks. |
|
|
31
|
+
| PyPI project `sp2react` | No person publishes | Releases are uploaded only by the `python-publish.yml` workflow through PyPI Trusted Publishing (OIDC), from the protected `release` environment. No API token exists. |
|
|
32
|
+
| Model provider credentials | None held by the project | Tests use a scripted model; no API key or Copilot token is stored in the repository or its CI. |
|
|
33
|
+
| Release signing | No long-lived key | Sigstore keyless signing in the release workflow, tied to the workflow's identity. |
|
|
34
|
+
| Read the Docs project | Maintainer | Builds from the GitHub repository through the Read the Docs GitHub App. |
|
|
35
|
+
| OpenSSF Best Practices entry | Maintainer | sp2react's entry on bestpractices.dev (linked from the README badge). |
|
|
36
|
+
|
|
37
|
+
## New maintainers and changes to permissions
|
|
38
|
+
|
|
39
|
+
- Someone becomes a maintainer after a sustained record of reviewed contributions, by agreement of the
|
|
40
|
+
existing maintainer(s), recorded in a pull request that updates this file.
|
|
41
|
+
- New collaborators start with the lowest GitHub role that lets them do their task (triage, then
|
|
42
|
+
write); admin rights and the PyPI/Read the Docs roles are granted only to maintainers.
|
|
43
|
+
- Any request to raise someone's permissions is reviewed by an existing maintainer before it is
|
|
44
|
+
granted, and the change is recorded in this file.
|
|
45
|
+
- Access is removed when it is no longer used, and at the latest after 12 months of inactivity.
|
|
46
|
+
|
|
47
|
+
## Continuity
|
|
48
|
+
|
|
49
|
+
The project currently has one maintainer (a "bus factor" of 1), which we would like to change; see
|
|
50
|
+
[ROADMAP.md](ROADMAP.md). Until then:
|
|
51
|
+
|
|
52
|
+
- everything needed to build, test and release is in the repository and runs in GitHub Actions; no
|
|
53
|
+
secret or personal machine is involved, so anyone with admin rights can release;
|
|
54
|
+
- the maintainer's GitHub account has a designated successor, so the repository (and through Trusted
|
|
55
|
+
Publishing, the ability to release) can be handed over if the maintainer is unable to continue;
|
|
56
|
+
- the project is MIT-licensed, so anyone may fork and continue it.
|
|
@@ -2,7 +2,9 @@ include README.md
|
|
|
2
2
|
include LICENSE
|
|
3
3
|
include CHANGELOG.md
|
|
4
4
|
include SECURITY.md
|
|
5
|
+
include GOVERNANCE.md CODE_OF_CONDUCT.md ROADMAP.md CONTRIBUTING.md THIRD_PARTY_NOTICES.md vex.openvex.json
|
|
5
6
|
recursive-include src/sp2react/agents/prompts *.md
|
|
7
|
+
include src/sp2react/container/Dockerfile
|
|
6
8
|
recursive-include src/sp2react/scaffold *
|
|
7
9
|
recursive-include tests *
|
|
8
10
|
prune examples
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: sp2react
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary: AI-agent pipeline that converts classic SharePoint ASPX/jQuery list forms and pages into a React + FastAPI app on your existing database
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: AI-agent pipeline that converts classic SharePoint ASPX/jQuery list forms and pages into a React + FastAPI app on your existing database. Zero runtime dependencies.
|
|
5
5
|
Author: Karthikeyan Balasundaram
|
|
6
|
-
License: MIT
|
|
6
|
+
License-Expression: MIT
|
|
7
7
|
Project-URL: Homepage, https://github.com/karthikbd/sp2react
|
|
8
8
|
Project-URL: Source Code, https://github.com/karthikbd/sp2react
|
|
9
9
|
Project-URL: Repository, https://github.com/karthikbd/sp2react
|
|
10
10
|
Project-URL: Bug Tracker, https://github.com/karthikbd/sp2react/issues
|
|
11
11
|
Project-URL: Changelog, https://github.com/karthikbd/sp2react/blob/main/CHANGELOG.md
|
|
12
|
-
Project-URL: Documentation, https://
|
|
12
|
+
Project-URL: Documentation, https://sp2react.readthedocs.io
|
|
13
13
|
Keywords: sharepoint,sharepoint migration,react,fastapi,jquery,spservices,aspx,list forms,migration,code conversion,ai agents,claude
|
|
14
14
|
Classifier: Development Status :: 3 - Alpha
|
|
15
15
|
Classifier: Intended Audience :: Developers
|
|
@@ -20,16 +20,12 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
-
Classifier:
|
|
23
|
+
Classifier: Typing :: Typed
|
|
24
24
|
Classifier: Operating System :: OS Independent
|
|
25
25
|
Requires-Python: >=3.10
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
|
28
|
-
Requires-Dist: pydantic>=2.5
|
|
29
|
-
Requires-Dist: pyyaml>=6.0
|
|
30
|
-
Requires-Dist: requests>=2.33.0
|
|
31
28
|
Provides-Extra: ntlm
|
|
32
|
-
Requires-Dist: requests-ntlm>=1.2; extra == "ntlm"
|
|
33
29
|
Provides-Extra: db
|
|
34
30
|
Requires-Dist: sqlalchemy>=2.0; extra == "db"
|
|
35
31
|
Provides-Extra: mysql
|
|
@@ -44,14 +40,20 @@ Requires-Dist: fastapi>=0.110; extra == "dev"
|
|
|
44
40
|
Requires-Dist: httpx>=0.27; extra == "dev"
|
|
45
41
|
Requires-Dist: uvicorn>=0.27; extra == "dev"
|
|
46
42
|
Requires-Dist: sqlalchemy>=2.0; extra == "dev"
|
|
43
|
+
Requires-Dist: requests>=2.33.0; extra == "dev"
|
|
47
44
|
Dynamic: license-file
|
|
48
45
|
|
|
49
46
|
# sp2react
|
|
50
47
|
|
|
51
48
|
[](https://pypi.org/project/sp2react/)
|
|
52
49
|
[](https://pypi.org/project/sp2react/)
|
|
50
|
+
[](https://github.com/karthikbd/sp2react/actions/workflows/tests.yml)
|
|
51
|
+
[](https://github.com/karthikbd/sp2react/actions/workflows/e2e.yml)
|
|
52
|
+
[](https://sp2react.readthedocs.io)
|
|
53
53
|
[](LICENSE)
|
|
54
|
+
[](https://github.com/karthikbd/sp2react/actions/workflows/cflite_batch.yml)
|
|
54
55
|
[](https://securityscorecards.dev/viewer/?uri=github.com/karthikbd/sp2react)
|
|
56
|
+
[](https://www.bestpractices.dev/projects/16934)
|
|
55
57
|
|
|
56
58
|
Convert classic SharePoint (2013 / 2016 / 2019 / Subscription Edition) list forms and pages built with **ASPX, jQuery and SPServices** into a **React + FastAPI** app that runs on **your existing database**.
|
|
57
59
|
|
|
@@ -86,29 +88,45 @@ Plain code does everything mechanical. AI agents (Claude through your GitHub Cop
|
|
|
86
88
|
|
|
87
89
|
| Guide | |
|
|
88
90
|
|---|---|
|
|
89
|
-
| [How it works](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
90
|
-
| [Installation](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
91
|
-
| [Configuration reference](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
92
|
-
| [Model provider and Bridger](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
93
|
-
| [Your database](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
94
|
-
| [End-to-end walkthrough](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
95
|
-
| [Command reference](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
96
|
-
| [The generated app](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
97
|
-
| [Security](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
98
|
-
| [Troubleshooting](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
99
|
-
| [Python API](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
100
|
-
| [Coverage and limitations](https://github.com/karthikbd/sp2react/blob/main/docs/
|
|
91
|
+
| [How it works](https://github.com/karthikbd/sp2react/blob/main/docs/getting_started/how-it-works.md) | stages, agents, data sources |
|
|
92
|
+
| [Installation](https://github.com/karthikbd/sp2react/blob/main/docs/getting_started/install.md) | Windows, corporate networks (JFrog), drivers, Node.js |
|
|
93
|
+
| [Configuration reference](https://github.com/karthikbd/sp2react/blob/main/docs/user_guide/configuration.md) | every `sp2react.yaml` key and environment variable |
|
|
94
|
+
| [Model provider and Bridger](https://github.com/karthikbd/sp2react/blob/main/docs/user_guide/model-provider.md) | Claude through Copilot Bridger, Anthropic, Azure OpenAI |
|
|
95
|
+
| [Your database](https://github.com/karthikbd/sp2react/blob/main/docs/user_guide/database.md) | SQL Server, MySQL, PostgreSQL; `map-db`; the mapping file; reconcile |
|
|
96
|
+
| [End-to-end walkthrough](https://github.com/karthikbd/sp2react/blob/main/docs/getting_started/walkthrough.md) | a site from start to deployed app |
|
|
97
|
+
| [Command reference](https://github.com/karthikbd/sp2react/blob/main/docs/reference/cli.md) | every command and option, every file written |
|
|
98
|
+
| [The generated app](https://github.com/karthikbd/sp2react/blob/main/docs/user_guide/generated-app.md) | layout, settings, roles, API, tests, deployment |
|
|
99
|
+
| [Security](https://github.com/karthikbd/sp2react/blob/main/docs/user_guide/security.md) | what is read, sent and written |
|
|
100
|
+
| [Troubleshooting](https://github.com/karthikbd/sp2react/blob/main/docs/user_guide/troubleshooting.md) | errors and fixes |
|
|
101
|
+
| [Python API](https://github.com/karthikbd/sp2react/blob/main/docs/reference/api.md) | drive sp2react from your own tool |
|
|
102
|
+
| [Coverage and limitations](https://github.com/karthikbd/sp2react/blob/main/docs/user_guide/limitations.md) | what converts and what does not |
|
|
101
103
|
|
|
102
104
|
## Installation
|
|
103
105
|
|
|
104
106
|
```bash
|
|
105
|
-
pip install
|
|
106
|
-
pip install "sp2react[
|
|
107
|
-
pip install "sp2react[
|
|
107
|
+
pip install sp2react # the tool itself: no other packages are downloaded
|
|
108
|
+
pip install "sp2react[mysql]" # plus SQLAlchemy + PyMySQL, for MySQL / MariaDB tables
|
|
109
|
+
pip install "sp2react[mssql]" # plus SQLAlchemy + pyodbc, for SQL Server tables (also needs Microsoft ODBC Driver 18)
|
|
108
110
|
```
|
|
109
111
|
|
|
112
|
+
**No runtime dependencies.** The HTTP client, Windows (NTLM) sign-in, the YAML reader and the spec validation are
|
|
113
|
+
part of the package and use only the Python standard library, so `pip install sp2react` pulls in nothing else and
|
|
114
|
+
an air-gapped install is one wheel. The database extras are needed only for `data_source: database`.
|
|
115
|
+
|
|
110
116
|
Python 3.10+. Node.js 20+ is needed to build the generated React app.
|
|
111
117
|
|
|
118
|
+
## Security and supply chain
|
|
119
|
+
|
|
120
|
+
No runtime dependencies, no telemetry; connections go only to the SharePoint site and the model endpoint in your
|
|
121
|
+
config. Code the agents write runs only in a sandbox (a Docker/Podman container, or a guard that blocks
|
|
122
|
+
writes, processes and network) while sp2react tests it; NTLM sign-in is an explicit, https-only choice. Releases are published with PyPI Trusted Publishing and carry provenance attestations, plus
|
|
123
|
+
Sigstore-signed assets and a CycloneDX SBOM on GitHub, and builds are reproducible. CI is hash-locked, runs a weekly
|
|
124
|
+
`pip-audit` (and `npm audit` of the generated app's front end), CodeQL, `mypy --strict` with Bandit security lint,
|
|
125
|
+
a coverage floor, OpenSSF Scorecard and ClusterFuzzLite fuzzing of the parsers; pull requests need signed-off commits
|
|
126
|
+
and pass dependency review. See [SECURITY.md](SECURITY.md), the
|
|
127
|
+
[security assurance case](https://sp2react.readthedocs.io/en/latest/development/security-assurance.html),
|
|
128
|
+
[GOVERNANCE.md](GOVERNANCE.md) and [ROADMAP.md](ROADMAP.md).
|
|
129
|
+
|
|
112
130
|
## Quick Start
|
|
113
131
|
|
|
114
132
|
```bash
|
|
@@ -131,7 +149,7 @@ sp2react status
|
|
|
131
149
|
```yaml
|
|
132
150
|
sharepoint:
|
|
133
151
|
site_url: https://sharepoint.example.com/sites/SEA
|
|
134
|
-
auth: ntlm # ntlm | cookie | bearer | none ; secrets come from environment variables
|
|
152
|
+
auth: ntlm # required: ntlm (https only) | cookie | bearer | none ; secrets come from environment variables
|
|
135
153
|
llm:
|
|
136
154
|
provider: bridger # bridger | anthropic | openai | azure_openai
|
|
137
155
|
api_format: anthropic # how Bridger serves Claude: anthropic (/v1/messages) or openai (/v1/chat/completions)
|
|
@@ -190,7 +208,7 @@ cd converted-app/frontend && npm install && npm run dev
|
|
|
190
208
|
- Behaviour comes from the spec at runtime. `runtime/rules.ts` (browser) and `app/rules.py` (API) interpret the same rules, and shared vectors keep them in agreement, so a direct API call cannot bypass a rule.
|
|
191
209
|
- The form uses SharePoint's layout, labels and control titles, the legacy site CSS is carried over, and old URLs (`/Lists/X/EditForm.aspx?ID=3&Source=...`) redirect to the new routes.
|
|
192
210
|
- SharePoint groups become roles. Membership comes from your users/groups tables or `data/roles.json`.
|
|
193
|
-
- Authentication: `AUTH_MODE=
|
|
211
|
+
- Authentication: `AUTH_MODE=header` (default) behind your gateway, or Entra ID in `app/auth.py`; `AUTH_MODE=dev` for local work only.
|
|
194
212
|
|
|
195
213
|
## Use it from your own tool
|
|
196
214
|
|
|
@@ -214,8 +232,8 @@ p.state # also written to sp2react-work/state.json
|
|
|
214
232
|
|
|
215
233
|
| Converts | Needs your input, or is not converted yet |
|
|
216
234
|
|---|---|
|
|
217
|
-
| List forms (New/Edit/Display) and their jQuery/SPServices behaviour | Workflows, event receivers, compiled solutions: their code is not reachable over REST.
|
|
218
|
-
| Web part pages (SitePages) with Script Editor / Content Editor JavaScript | InfoPath and Power Apps forms:
|
|
235
|
+
| List forms (New/Edit/Display) and their jQuery/SPServices behaviour | Workflows, event receivers, compiled solutions: their code is not reachable over REST, and sp2react does not detect them yet. Check Site Contents; export the definitions or source to convert them |
|
|
236
|
+
| Web part pages (SitePages) with Script Editor / Content Editor JavaScript | InfoPath and Power Apps forms: not detected, not converted |
|
|
219
237
|
| Basic list views (columns, sort, row limit) | Views with filters and grouping, document libraries, custom master-page branding, rich grids (sort/search/select/export), modal dialogs: planned |
|
|
220
238
|
| SharePoint groups as roles, old URL redirects | Calculated columns are shown but not recomputed; managed metadata, item-level permissions, alert emails |
|
|
221
239
|
|
|
@@ -224,8 +242,8 @@ Run the inventory on your site first. It shows which pages and scripts were foun
|
|
|
224
242
|
## Running Tests
|
|
225
243
|
|
|
226
244
|
```bash
|
|
227
|
-
pip install -e
|
|
228
|
-
python -m pytest tests/ -
|
|
245
|
+
pip install --require-hashes -r ci/requirements-test.txt && pip install --no-deps -e .
|
|
246
|
+
python -m coverage run -m pytest tests/ -q && python -m coverage report
|
|
229
247
|
```
|
|
230
248
|
|
|
231
249
|
The suite runs against `tests/fixtures/legacy-site`, a fictional Contoso procurement site with jQuery 1.12 / SPServices list forms and a REST-driven dashboard. It covers:
|
|
@@ -238,9 +256,12 @@ The suite runs against `tests/fixtures/legacy-site`, a fictional Contoso procure
|
|
|
238
256
|
|
|
239
257
|
## CI / CD
|
|
240
258
|
|
|
241
|
-
- `tests.yml`:
|
|
242
|
-
- `
|
|
243
|
-
- `
|
|
259
|
+
- `tests.yml`: the test suite with coverage on Python 3.10–3.13 (ruff, `mypy --strict`), a zero-dependency install, a reproducible-build check and a warnings-as-errors docs build, on every push and pull request.
|
|
260
|
+
- `e2e.yml`: `data_source: database` against MySQL 8.4 and SQL Server 2022.
|
|
261
|
+
- `codeql.yml`, `vulnerability-audit.yml`, `cflite_pr.yml` / `cflite_batch.yml`, `scorecard.yml`; on pull requests `dependency-review.yml` and `dco.yml`.
|
|
262
|
+
- `python-publish.yml`: on a published GitHub release, tests, builds and publishes to PyPI through **Trusted Publishing** (OIDC, no stored token) and signs the assets; `verify-release.yml` re-checks them.
|
|
263
|
+
|
|
264
|
+
`main` accepts changes only through pull requests whose required checks pass.
|
|
244
265
|
|
|
245
266
|
## Security
|
|
246
267
|
|