Skip to content
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

correct paramters in cli attributes method #2863

Merged

Conversation

jaegeral
Copy link
Collaborator

@jaegeral jaegeral commented Aug 8, 2023

The current way of cli is causing a wrong attribute to be added:

./timesketch.par --sketch 123 --output-format text sketch attributes add --name foo --ontology intelligence --value bar
Attribute added:
Name: foo
Ontology: intelligence
Value: bar
❯ ./timesketch.par --sketch 123 --output-format json sketch attributes list
{
    "foo": {
        "ontology": "bar",
        "value": "intelligence"
    },
    "intelligence": {
        "ontology": "intelligence",
        "value": {
            "data": [
                {
                    "externalURI": "aaaa",
                    "ioc": "foo",
                    "tags": [],
                    "type": "other"
                }
            ]
        }
    }
}

This is the header of the function that is called:
def add_attribute(self, name, value, ontology="text"):

This PR fixes that and writes the correct values.

Closing issues
closes #2862

@jaegeral jaegeral requested a review from tomchop August 8, 2023 13:40
@jaegeral jaegeral marked this pull request as ready for review August 8, 2023 13:40
@jaegeral jaegeral merged commit 703b40b into google:master Aug 8, 2023
20 checks passed
@jaegeral jaegeral deleted the 2023-08-08_2862_cli_client_param_fix branch August 8, 2023 14:00
Sign up for free to 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.

[cli] wrong order of parameters
2 participants