Skip to content

FormulaInfo復元時に保存bytecodeを信頼しない - #86

Merged
opaopa6969 merged 1 commit into
masterfrom
fix/issue-83-formulainfo-bytecode-trust
Aug 28, 2026
Merged

FormulaInfo復元時に保存bytecodeを信頼しない#86
opaopa6969 merged 1 commit into
masterfrom
fix/issue-83-formulainfo-bytecode-trust

Conversation

@opaopa6969

Copy link
Copy Markdown
Owner

Summary

  • require source formula when restoring FormulaInfo
  • always rebuild calculators from formula text under the current execution policies
  • ignore persisted Java/class bytecode as an execution input
  • document the trust boundary and programmatic precompiled-artifact distinction
  • add regression coverage for tampered bytecode and bytecode-only documents

A stored MD5 cannot authenticate bytecode because the digest and payload are editable in the same document. Rebuilding also preserves JavaCodeBlockPolicy as the authority for formulas containing embedded Java.

Tests

  • ./mvnw -Dtest=FormulaInfoStoredByteCodePolicyTest,FormulaInfoParserTest,FormulaInfoListTest,FormulaInfoExecutionBackendSelectionTest,JavaCodeBlockPolicyTest test
    • 17 tests, 0 failures
  • ./mvnw test
    • 684 tests, 0 failures, 0 errors, 9 skipped
    • 8m28s locally

Closes#83

@opaopa6969
opaopa6969 merged commit 1b400be into masterAug 28, 2026
2 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FormulaInfo復元時に保存済みbytecodeを無条件に実行しない

1 participant

@opaopa6969