Conversation
Signed-off-by: GatisB <l22exc@gmail.com>
…ging Signed-off-by: GatisB <l22exc@gmail.com>
…dia type title from error response Signed-off-by: GatisB <l22exc@gmail.com>
…ing in mapSourceError and add test for upstream error relaying Signed-off-by: GatisB <l22exc@gmail.com>
- Introduced CI workflow for building, testing, and image management. - Added dependency review workflow to flag vulnerabilities in pull requests. - Updated .gitattributes to enforce LF line endings for Go files. - Enhanced golangci-lint configuration for better code quality checks. - Updated Dockerfile to use a new base image and Go version. - Revised README for clarity and detail on service functionality. - Fixed configuration retrieval in ServerCore method. - Updated go.mod to reflect the latest Go version. - Improved error handling in PDF rendering functions. - Refactored PDF sample generation in tests for better performance. Signed-off-by: GatisB <l22exc@gmail.com>
…formance Signed-off-by: GatisB <l22exc@gmail.com>
…rove compatibility and performance Signed-off-by: GatisB <l22exc@gmail.com>
- Added `dispatchRenderer` to route rendering calls based on MIME types. - Introduced `NewDispatch` function to initialize PDF, image, and text backends. - Implemented methods for inspecting, rendering pages, and text extraction for each format. - Created tests for dispatch renderer to ensure correct routing and error handling. Add image renderer for raster image formats - Implemented `imageRenderer` to handle PNG, JPEG, and GIF formats. - Added methods for inspecting images, rendering pages, and checking readiness. - Included tests for image rendering, scaling, and error handling for oversized images. Create text renderer for plain text and Markdown - Developed `textRenderer` to paginate and rasterize text content into images. - Implemented methods for inspecting text, rendering pages, and returning text layers. - Added tests for text rendering, pagination, and handling of special characters. Update routes to handle unsupported MIME types - Modified test cases to include handling of unsupported binary formats. - Ensured that non-previewable types yield appropriate results without errors. Signed-off-by: GatisB <l22exc@gmail.com>
- Introduced officeRenderer to handle conversion of Office documents (Word, Excel, PowerPoint) to PDF. - Updated Config struct to include OfficeConverterURL and OfficeConverterTimeout. - Enhanced NewDispatch function to conditionally register Office backend based on configuration. - Implemented Sniff function to detect OOXML MIME types from ZIP containers. - Added tests for officeRenderer, including successful conversion, unsupported MIME types, and error handling for upstream issues. - Updated router to handle upstream unavailability errors distinctly. - Added security event logging for scope denials in the router. Signed-off-by: GatisB <l22exc@gmail.com>
Signed-off-by: GatisB <l22exc@gmail.com>
Signed-off-by: GatisB <l22exc@gmail.com>
Signed-off-by: GatisB <l22exc@gmail.com>
…iews Signed-off-by: GatisB <l22exc@gmail.com>
Signed-off-by: GatisB <l22exc@gmail.com>
Signed-off-by: GatisB <l22exc@gmail.com>
- Updated azugo.io/azugo, azugo.io/core, and azugo.io/opentelemetry to their latest versions. - Added new dependencies for github.com/cenkalti/backoff/v7 and updated several other libraries. - Changed the image retrieval method in the PDFium renderer from `rendered.Result.Image` to `rendered.Result.RenderedImage` to align with the updated API. Signed-off-by: GatisB <l22exc@gmail.com>
…the running build ci.yml has always computed a <branch>-<short-sha> version and passed it to the image build as a VERSION build-arg, but the Dockerfile declared no ARG VERSION and no -X main.Version, so the value was computed and thrown away. main.Version kept its compiled-in development default, and since that value is what the app reports as service.version on every log line, no log could say which build produced it. Both halves are wired now. Verified on the artefact rather than the source: built with --build-arg VERSION=develop-abc1234, extracted /server from the image, and the value is present in the binary; go version -m reports go1.27.0. Also in this commit: .gitattributes pins Dockerfile alongside the other text types to LF, and a CHANGELOG. Signed-off-by: GatisB <l22exc@gmail.com>
Two tooling fixes, no source change and nothing a consumer or operator feels. actions/setup-go moves v6.5.0 to v7.0.0 (b7ad1dad31e06c5925ef5d2fc7ad053ef454303e), the version dependabot proposes. Rolled by editing the pinned line in place rather than re-copying the workflow templates, because a re-copy would wipe the per-repo edit points that are there on purpose — the fuzz job, the integration and testhelpers build tags. Those are all still present. .gitattributes now pins itself. It was the one text file its own list did not cover, so on a Windows checkout core.autocrlf handed it back as CRLF while git stored LF, and a byte-for-byte comparison against the template flapped between clean and drifted depending on when the file was last written. That had already been chased down twice. Signed-off-by: GatisB <l22exc@gmail.com>
DEV_ACCEPT_USER_TOKEN and DEV_USER_TOKEN_AUDIENCE are deleted: the service now always validates its own service-token audience, and every scope check is enforced unconditionally. The switch existed so a test client could drive the API with a bare user token; the E2E suite now presents delegated service tokens obtained by RFC 8693 token exchange, the same way the backend-for-frontend acts on a user's behalf, so the concession has no remaining consumer and one less weakening flag ships in the binary. Signed-off-by: GatisB <l22exc@gmail.com>
…ion; DCO sign-off The repository gains the files a reader needs on day one: SECURITY.md (private disclosure route, response expectations, and what matters most for a service that opens untrusted documents), CONTRIBUTING.md (the CI gate a change must pass, the fuzz targets, the Developer Certificate of Origin sign-off), and the default gitleaks configuration used by the repository's own checks. The README links them; the MIT licence is unchanged. Signed-off-by: GatisB <l22exc@gmail.com>
The notice said "go-make-bytes", which is a GitHub organisation and cannot hold a copyright. The rights in this code are held by SIA "Go Make Bytes". Only the holder line changes: the MIT text is byte-identical, and the licence granted to anyone using this service is unchanged. Signed-off-by: GatisB <l22exc@gmail.com>
This file's comment explained how to write a gitleaks allowlist entry. That is backwards: the rule here is that a scanner-flagged test value gets REMOVED - built from its parts at run time - rather than exempted, because an exemption is a claim everyone who later reads a green scan has to take on trust, while a generated value needs no trust at all. The comment now says that first. The old wording was also wrong on its own terms, and both corrections are measured on gitleaks v8.30.1. It said to scope an entry by commit and path; a matching paths entry does not narrow an exemption, it switches the whole file off, so a real secret landing in that file later goes unreported and the scan still reports clean - condition = AND does not change it. And a paths regex that does NOT match is a silent no-op, with matching depending on the scan mode: dir matches the path as scanned, git a repo-relative one, so the same anchored regex can work in one mode and do nothing in the other. The file now says to pin an exemption to the value and to record the mode it was verified in. No rule changed: [extend] useDefault = true is untouched and the scan result is unchanged. Signed-off-by: GatisB <l22exc@gmail.com>
The file has been telling contributors that a pull request whose commits lack a Signed-off-by line fails a DCO check. No such check existed. This is it: every commit in a pull request must carry a sign-off whose name and address match that commit's own author, which is the whole sentence and not just the presence of a trailer. Merge commits are skipped, since git generates them. It reads the commits with git, so no third-party action is added to pin or audit. Signed-off-by: GatisB <l22exc@gmail.com>
v0.19.0 and the three versions before it are no longer published from this repository. The library's history was rewritten to remove a value that should never have been committed, and v0.20.0 is the first release from the corrected history. Nothing about the library's behaviour changed: the only source difference is a test fixture that now builds its value instead of spelling it. Signed-off-by: GatisB <l22exc@gmail.com>
azugo v0.38.0 and the gmb-lib libraries to their current tags, including go-platform-kit v1.10.0. No route, payload, error, environment variable, default or log field is affected. Each CHANGELOG records it, because a deployment pinning image digests would otherwise see a new build with no accompanying note. Signed-off-by: GatisB <l22exc@gmail.com>
The inbound gate refused with 401 and one undifferentiated line: the error naming an expired token, a wrong audience or issuer, a bad signature or an unknown key id was discarded, and four separate DPoP failures collapsed into one code. An expired service token and a forged one produced identical evidence. Refusals now carry a reason in this service's own log. The response is byte-identical — same status, same body, same WWW-Authenticate — because telling a caller which check it failed hands an attacker half the answer. A DPoP-Nonce challenge is untouched: it is the protocol's first-request handshake, not a refusal. Signed-off-by: GatisB <l22exc@gmail.com>
…nforcement The sign-off check on this repository is enforced by the org-installed DCO app plus a branch ruleset requiring its status; the in-tree workflow only duplicated that as a second advisory check. CONTRIBUTING.md's sign-off requirement is unchanged. Signed-off-by: GatisB <l22exc@gmail.com>
The changelog was dated rather than versioned, which was right while the image was consumed per branch and commit. With v0.1.0 released, the file anchors on versions: one v0.1.0 entry describing the service as first released; the pre-release dated history remains in git. Signed-off-by: GatisB <l22exc@gmail.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.