Conversation
* Adding some more test coverage. Lots more to be done, but good enough for now * adding github actions * fixing flaky test * ignoring unix timestamp, other coverage is fine * fixed the wrong test * adding network tests * adding test for RunOnce * adding devnull and stdout tests * Adding coveralls to CI * fixing Elastic HTTP test * fixing timezone extraction bug in the test * changing goveralls invocation method
* Updating deps, adding test coverage, removing some things, updating version * Tests/increase coverage (#45) * Adding some more test coverage. Lots more to be done, but good enough for now * adding github actions * fixing flaky test * ignoring unix timestamp, other coverage is fine * fixed the wrong test * adding network tests * adding test for RunOnce * adding devnull and stdout tests * Adding coveralls to CI * fixing Elastic HTTP test * fixing timezone extraction bug in the test * changing goveralls invocation method * Adding deploy steps * Removed modinput and Splunk app support (#47) * Removed modinput and Splunk app support (#48) * Adding fix for long intervals not shutting down in a reasonable time (#49) * adding LLM context generator script (#50) * Last commit to up version to 0.11.0 * fixing CI for master branch * fixing env vars for docker * Refactoring API to use Python 3. Added support for a local dev environment. * Fixing database export bug. Adding support for GOGEN_APIURL to use local API * Adding local dev environment for gogen-api. Updated logging. Added pulling GitHub gist in the API rather than the client. * adding tests for Gogen API * Refactored API to store configurations in S3. * Local API now primed from local configs rather than backup. * Now can deploy production API. Various fixes for production.
* First draft of a UI. Broken WASM implementation but otherwise working. * Working UI implementation for WASM * Refactored gogenWasm.ts for better readability * Numerous UI updates and fixes. * First pass at unit tests * Added unit tests for Pages and missing component tests * Tests for the backend and App.tsx * Updated loading spinner and default execute options * Getting ready for deployment. Created staging environment. Updated code to fix CORS problems. Added support for multiple environments.
* ensure rotchan is drained before logging total events and bytes * Add tests to validate the fix --------- Co-authored-by: Jan Królikowski <yanekk86@gmail.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.35.0 to 0.38.0. - [Commits](golang/net@v0.35.0...v0.38.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-version: 0.38.0 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Clint Sharp <clint@typhoon.org>
* updating release to push release images and bumping the version. * cherry picking release changes --------- Co-authored-by: azamora <azamora@cribl.io>
* adding outputter race condition test * fixing race condition * somehow got some weird changes in here
* Add GitHub OAuth authentication for configuration management Backend: - Add auth.py Lambda for OAuth code exchange - Add delete.py Lambda for configuration deletion with ownership verification - Add my_configs.py Lambda to list user's configurations - Extract GitHub API helpers to github_utils.py - Update template.yaml with new endpoints and OAuth parameters - Add DELETE to CORS allowed methods - Fix upsert.py to set 'gogen' primary key Frontend: - Add AuthContext for auth state management (login/logout/token storage) - Add LoginPage with GitHub OAuth button - Add AuthCallbackPage to handle OAuth redirect - Add MyConfigurationsPage to list/edit/delete user's configs - Add EditConfigurationPage for creating and editing configs - Add ProtectedRoute component for auth-required routes - Update Header with user menu and login/logout - Update ConfigurationDetailPage with edit/delete/fork buttons - Add auth interceptor to API client - Update environment files with GitHub OAuth config Local dev: - Add env.json.example for local OAuth testing - Update start_dev.sh to load OAuth credentials Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Add GitHub OAuth secrets to CI/CD deployment - Update ci.yml to pass OAuth credentials based on branch (staging/prod) - Update release.yml to pass prod OAuth credentials - Update deploy_lambdas.sh to require and pass OAuth params to SAM deploy Required GitHub secrets: - STAGING_GITHUB_OAUTH_CLIENT_ID - STAGING_GITHUB_OAUTH_CLIENT_SECRET - PROD_GITHUB_OAUTH_CLIENT_ID - PROD_GITHUB_OAUTH_CLIENT_SECRET Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * adding client ids --------- Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add GitHub OAuth authentication for configuration management
Backend:
- Add auth.py Lambda for OAuth code exchange
- Add delete.py Lambda for configuration deletion with ownership verification
- Add my_configs.py Lambda to list user's configurations
- Extract GitHub API helpers to github_utils.py
- Update template.yaml with new endpoints and OAuth parameters
- Add DELETE to CORS allowed methods
- Fix upsert.py to set 'gogen' primary key
Frontend:
- Add AuthContext for auth state management (login/logout/token storage)
- Add LoginPage with GitHub OAuth button
- Add AuthCallbackPage to handle OAuth redirect
- Add MyConfigurationsPage to list/edit/delete user's configs
- Add EditConfigurationPage for creating and editing configs
- Add ProtectedRoute component for auth-required routes
- Update Header with user menu and login/logout
- Update ConfigurationDetailPage with edit/delete/fork buttons
- Add auth interceptor to API client
- Update environment files with GitHub OAuth config
Local dev:
- Add env.json.example for local OAuth testing
- Update start_dev.sh to load OAuth credentials
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add GitHub OAuth secrets to CI/CD deployment
- Update ci.yml to pass OAuth credentials based on branch (staging/prod)
- Update release.yml to pass prod OAuth credentials
- Update deploy_lambdas.sh to require and pass OAuth params to SAM deploy
Required GitHub secrets:
- STAGING_GITHUB_OAUTH_CLIENT_ID
- STAGING_GITHUB_OAUTH_CLIENT_SECRET
- PROD_GITHUB_OAUTH_CLIENT_ID
- PROD_GITHUB_OAUTH_CLIENT_SECRET
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* adding client ids
* Fix CORS preflight for new API endpoints
Add explicit OPTIONS methods with mock integrations for:
- /v1/auth/github
- /v1/delete/{proxy+}
- /v1/my-configs
API Gateway requires explicit OPTIONS routing for aws_proxy integrations
to handle browser preflight requests properly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Revert "Fix CORS preflight for new API endpoints"
This reverts commit e3bdde7.
* Fix CORS allowOrigins - remove embedded single quotes
The x-amazon-apigateway-cors allowOrigins should be plain URLs, not
quoted strings. The browser sends 'Origin: https://staging.gogen.io'
but the config was expecting "'https://staging.gogen.io'" (with quotes).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add explicit OPTIONS methods for CORS preflight handling
API Gateway REST APIs with DefinitionBody don't honor the
x-amazon-apigateway-cors extension. Need explicit OPTIONS methods
with mock integrations to handle CORS preflight requests.
Added OPTIONS handlers for:
- /v1/upsert
- /v1/auth/github
- /v1/delete/{proxy+}
- /v1/my-configs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
* Add GitHub OAuth authentication for configuration management
Backend:
- Add auth.py Lambda for OAuth code exchange
- Add delete.py Lambda for configuration deletion with ownership verification
- Add my_configs.py Lambda to list user's configurations
- Extract GitHub API helpers to github_utils.py
- Update template.yaml with new endpoints and OAuth parameters
- Add DELETE to CORS allowed methods
- Fix upsert.py to set 'gogen' primary key
Frontend:
- Add AuthContext for auth state management (login/logout/token storage)
- Add LoginPage with GitHub OAuth button
- Add AuthCallbackPage to handle OAuth redirect
- Add MyConfigurationsPage to list/edit/delete user's configs
- Add EditConfigurationPage for creating and editing configs
- Add ProtectedRoute component for auth-required routes
- Update Header with user menu and login/logout
- Update ConfigurationDetailPage with edit/delete/fork buttons
- Add auth interceptor to API client
- Update environment files with GitHub OAuth config
Local dev:
- Add env.json.example for local OAuth testing
- Update start_dev.sh to load OAuth credentials
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add GitHub OAuth secrets to CI/CD deployment
- Update ci.yml to pass OAuth credentials based on branch (staging/prod)
- Update release.yml to pass prod OAuth credentials
- Update deploy_lambdas.sh to require and pass OAuth params to SAM deploy
Required GitHub secrets:
- STAGING_GITHUB_OAUTH_CLIENT_ID
- STAGING_GITHUB_OAUTH_CLIENT_SECRET
- PROD_GITHUB_OAUTH_CLIENT_ID
- PROD_GITHUB_OAUTH_CLIENT_SECRET
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* adding client ids
* Fix CORS preflight for new API endpoints
Add explicit OPTIONS methods with mock integrations for:
- /v1/auth/github
- /v1/delete/{proxy+}
- /v1/my-configs
API Gateway requires explicit OPTIONS routing for aws_proxy integrations
to handle browser preflight requests properly.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Revert "Fix CORS preflight for new API endpoints"
This reverts commit e3bdde7.
* Fix CORS allowOrigins - remove embedded single quotes
The x-amazon-apigateway-cors allowOrigins should be plain URLs, not
quoted strings. The browser sends 'Origin: https://staging.gogen.io'
but the config was expecting "'https://staging.gogen.io'" (with quotes).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add explicit OPTIONS methods for CORS preflight handling
API Gateway REST APIs with DefinitionBody don't honor the
x-amazon-apigateway-cors extension. Need explicit OPTIONS methods
with mock integrations to handle CORS preflight requests.
Added OPTIONS handlers for:
- /v1/upsert
- /v1/auth/github
- /v1/delete/{proxy+}
- /v1/my-configs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* Add OPTIONS methods for all API endpoints
After login, the axios interceptor adds Authorization headers to all
requests, which triggers CORS preflight for GET requests too.
Added OPTIONS handlers for:
- /v1/get/{proxy+}
- /v1/list
- /v1/search
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Transform the UI from a light web app to a dark terminal-style aesthetic: - Add terminal color palette (term-bg, term-green, term-cyan, term-red, etc.) - Add JetBrains Mono font for code and config names - Update all components with dark backgrounds and muted borders - Configure Monaco editor and xterm terminal with vs-dark theme - Reduce padding throughout for more compact, developer-friendly layout Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
…rowser (#79) Add ExecutionComponent to EditConfigurationPage so users can test configs while creating or editing. Replace output mode dropdown with terminal/structured tabs that are both populated from a single execution. Add interactive JsonBrowser component with per-event collapse/expand and expand-all toggle. Fix staging dev proxy to avoid CORS issues. Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Add comprehensive tests across generator, internal, outputter, rater, run, and timer packages. Extract shared test helpers (setupGenTest, resetRunState) to reduce boilerplate. Consolidate token validation tests into table-driven subtests. Remove duplicate test and fix no-op assertions. Add CLAUDE.md with project conventions. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
- Replace 100+ lines of hardcoded rate maps with uniformRateMap() helper - Replace 15 if-zero-then-default blocks with generic setDefault[T]() helper - Fix !x.initialized style in 4 outputters (idiomatic Go) - Use strings.HasPrefix for URL check safety (prevents panic on short strings) - Remove unused sync.Once variable Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- ioutil.ReadAll -> io.ReadAll - ioutil.ReadFile -> os.ReadFile - ioutil.WriteFile -> os.WriteFile - ioutil.Discard -> io.Discard - Remove io/ioutil imports from all affected files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract shared _raw->event, _time->time renaming logic into template/hec.go and call it from both outputter and template packages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add HTTPError type in internal/errors.go for structured HTTP errors - Add doHTTPRequest/doGet/doPost helpers that properly defer Body.Close() - Add defaultAPIClient with 30s timeout (was unbounded) - Refactor listsearch/Get/upsert to use helpers, fixing body leaks - List() and Search() now return errors instead of calling log.Fatal - Upsert() now returns error instead of calling log.Fatal - Fix parseWebConfig body leak with defer resp.Body.Close() - Fix outputter/http.go body leak by using defer on resp.Body.Close() - Use %w for error wrapping throughout gogen.go Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- parseFileConfig now returns parse errors instead of silently logging - Log json.Marshal errors in template funcs instead of ignoring - Log template creation errors in config instead of discarding - Use %w for error wrapping in parseFileConfig - Update tests to expect returned parse errors Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Go convention requires package name to match directory name. All importers already use an alias (log "github.com/coccyx/gogen/logger") so no other changes are needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract validation, parsing, and system token logic from the 900+ line config.go into config_validate.go, config_parse.go, and config_system_tokens.go. All files remain in package internal with no import changes needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…uth2.NoContext Use sync.Once to ensure the ROT channel and readStats goroutine are initialized exactly once, eliminating the race between ROT() starting in a goroutine and Account() reading the channel. ReadFinal resets the Once so tests can re-initialize cleanly. Replace deprecated oauth2.NoContext with context.Background() in GitHub OAuth flows. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The regex used a $ anchor but network output includes a trailing newline, causing intermittent match failures depending on test execution order. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ration Add tests/integration_test.go with 28 tests covering config defaults, parsing, all output templates, token processing, HEC transform, ROT concurrency, HTTP helpers, fromSample inheritance, and replay generator. Use strings.Builder for random string/hex, IPv4, and IPv6 token generation to avoid repeated string concatenation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove TOCTOU os.Stat before os.ReadFile in parseFileConfig - Use setDefault[T] for sample defaults in validate() - Fix Get() 404 error wrapping to use %w for proper unwrapping - Remove unused defaultRandomizeEvents constant - Add early break in addToken loops, hoist os.Hostname outside loop - Optimize TestTokenRandomInt to single pipeline run with count:10 - Rename TestDoPostWithHeaders to TestListSendsDefaultHeaders Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.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.